MySql 跟踪命令

时间:2021-08-23 10:10:08
SHOW OPEN TABLES WHERE In_use > 0;

SHOW FULL PROCESSLIST;

KILL 53678;

USE table1;

SET profiling = 1;

SHOW PROFILES;

SET profiling = 0;

SHOW TABLES;

SHOW PROFILES;

SHOW PROFILE FOR QUERY 188;

SHOW PROFILE block io,cpu FOR QUERY 2;

SELECT VERSION();

SHOW VARIABLES LIKE '%pro%';

SELECT @@profiling;

SHOW VARIABLES LIKE '%max_connections%';

SHOW STATUS LIKE 'Threads_connected';

SHOW STATUS LIKE 'Threads_running';