MySQL commands
By knowing the underlying commands that are run, we hope you can make more use of Jet Profiler for MySQL, and better understand the information that is presented. The performance metrics are gathered using the commands SHOW PROCESSLIST, SHOW OPEN TABLES and SHOW GLOBAL STATUS. An explanation on what information is given from each command is explained below.
SHOW PROCESSLIST
This command shows a snapshot of the threads in MySQL. A thread is a user connection, so the list shows all connected users (and some internal MySQL threads, such as replication threads). For every thread, the following information is shown:
- Username
- Source ip / port
- (default) Database (schema)
- Command (such as querying, sleeping) – this can reveal which threads are actually doing something, and which are idle.
- Query – The query being run.
- Time – How many seconds the query has run.
- State (such as updating, locked, writing tmp table to disk) – this can reveal what subtask a query is in
This is where Jet Profiler for MySQL gets most of its information. By watching changes in the processlist, it can determine which users are consuming most number of threads and what queries are run the most (in terms of time). It can observe the state and determine if a query is lock prone or not, or if it is creating a lot of temporary tables on disk. It can also keep track of queries that take long time to run, and mark them as slow queries. For more information on SHOW PROCESSLIST, See:
http://dev.mysql.com/doc/refman/5.1/en/show-processlist.html
No comments:
Post a Comment