processlist_states

NAME

processlist_states: Summary of processlist states and their run time

TYPE

View

DESCRIPTION

processlist_states aggregates the various thread states and presents time metrics for those states.

It makes for a general overview of "what is my MySQL server doing right now".

STRUCTURE

mysql> DESC common_schema.processlist_states;
+-------------------------+---------------+------+-----+---------+-------+
| Field                   | Type          | Null | Key | Default | Extra |
+-------------------------+---------------+------+-----+---------+-------+
| state                   | varchar(64)   | YES  |     | NULL    |       |
| count_processes         | bigint(21)    | NO   |     | 0       |       |
| median_state_time       | decimal(10,2) | YES  |     | NULL    |       |
| median_95pct_state_time | decimal(10,2) | YES  |     | NULL    |       |
| max_state_time          | int(7)        | YES  |     | NULL    |       |
| sum_state_time          | decimal(32,0) | YES  |     | NULL    |       |
+-------------------------+---------------+------+-----+---------+-------+

SYNOPSIS

Columns of this view:

  • state: a thread state which is currently running
  • count_processes: number of threads (processes) in this state
  • median_state_time: median run time processes in this state
  • median_95pct_state_time: run time at 95% processes (95% processes run at this or under this time) in this state
  • max_state_time: maximum run time for process in this state
  • sum_state_time: sum of all run time seconds for processes in this state

EXAMPLES

mysql> SELECT * FROM common_schema.processlist_states;
+----------------------------------------------------------------+-----------------+-------------------+-------------------------+----------------+----------------+
| state                                                          | count_processes | median_state_time | median_95pct_state_time | max_state_time | sum_state_time |
+----------------------------------------------------------------+-----------------+-------------------+-------------------------+----------------+----------------+
|                                                                |              77 |              2.00 |                  203.00 |            500 |           2475 |
| NULL                                                           |               2 |              0.00 |                    0.00 |              0 |              0 |
| Has sent all binlog to slave; waiting for binlog to be updated |               2 |          38896.00 |                38896.00 |          38896 |          77792 |
| freeing items                                                  |               1 |              0.00 |                    0.00 |              0 |              0 |
| Sending data                                                   |               1 |              0.00 |                    0.00 |              0 |              0 |
+----------------------------------------------------------------+-----------------+-------------------+-------------------------+----------------+----------------+

ENVIRONMENT

MySQL 5.1 or newer.

SEE ALSO

processlist_summary, processlist_top

AUTHOR

Shlomi Noach
 
common_schema documentation