一.基本的分析命令
explain
show create table name\G;
show index from tablename;
show table status like 'tablename'\G;
show global status like 'create_tmp_%tables';例如内部表的使用,索引以及读取的行的数量
查看当前会话的状态
mysql>flush status;
mysql>select ....
mysql>show session status like 'handler_read%';
show session/global variables like 'tmp_table_size';
本文介绍了MySQL中用于分析性能和状态的基本命令,包括explain、show create table、show index from等,帮助开发者理解如何通过这些命令优化数据库性能。
3519

被折叠的 条评论
为什么被折叠?



