Created
September 12, 2015 01:17
-
-
Save morgo/82d80075e5906bfeefdf to your computer and use it in GitHub Desktop.
SHOW PROCESSLIST in 5.7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# works in all versions | |
mysql> SHOW PROCESSLIST; | |
+----+----------+-----------+------+---------+------+----------+------------------+ | |
| Id | User | Host | db | Command | Time | State | Info | | |
+----+----------+-----------+------+---------+------+----------+------------------+ | |
| 3 | msandbox | localhost | NULL | Query | 0 | starting | SHOW PROCESSLIST | | |
+----+----------+-----------+------+---------+------+----------+------------------+ | |
1 row in set (0.00 sec) | |
# using SYS (ships with MySQL 5.7) | |
mysql> select * from sys.session\G | |
*************************** 1. row *************************** | |
thd_id: 29 | |
conn_id: 3 | |
user: msandbox@localhost | |
db: sys | |
command: Query | |
state: Sending data | |
time: 0 | |
current_statement: select * from sys.session | |
statement_latency: 1.38 ms | |
progress: NULL | |
lock_latency: 880.00 us | |
rows_examined: 0 | |
rows_sent: 0 | |
rows_affected: 0 | |
tmp_tables: 4 | |
tmp_disk_tables: 1 | |
full_scan: YES | |
last_statement: NULL | |
last_statement_latency: NULL | |
current_memory: 2.82 MiB | |
last_wait: wait/synch/mutex/innodb/file_format_max_mutex | |
last_wait_latency: 32.08 ns | |
source: trx0sys.cc:781 | |
trx_latency: 2.44 m | |
trx_state: ACTIVE | |
trx_autocommit: NO | |
pid: 5684 | |
program_name: mysql | |
1 row in set (0.07 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment