MySQL查看查询的成本

版权声明:如若转载,请联系作者。 https://blog.csdn.net/liu16659/article/details/84979866

MySQL查看查询的成本

1. 命令

mysql> show status like '%last_query_cost%';
+-----------------+------------+
| Variable_name   | Value      |
+-----------------+------------+
| Last_query_cost | 396.199000 |
+-----------------+------------+
1 row in set (0.00 sec)

这个命令可以用于比较两个相近的命令谁的查询最优。

猜你喜欢

转载自blog.csdn.net/liu16659/article/details/84979866