mysql 底层查询收集
1.慢查询,死锁
show processlist; :显示正在执行的sql 以及状态。
2.查询表的分区
SELECT
partition_name part,
partition_expression expr,
partition_description descr,
table_rows
FROM
INFORMATION_SCHEMA.partitions
WHERE
TABLE_SCHEMA =
schema
()
AND
TABLE_NAME=
'table'
;
2.引擎相关
1.select * from information_schema.innodb_trx where TIME_TO_SEC(timediff(now(),trx_started))>60 查询事务执行超过60秒的