Mysql EXPLAIN列的解释
摘要:转自:http://blog.chinaunix.net/uid-540802-id-3419311.html explain显示了mysql如何使用索引来处理select语句以及连接表。可以帮助选择更好的索引和写出更优化的查询语句。 使用方法,在select语句前加上explain就可以了: 如:
阅读全文
posted @
2019-03-27 14:43
山高似水深
阅读(1606)
推荐(0) 编辑
mysql查看执行sql语句的记录日志
摘要:1、使用processlist,但是有个弊端,就是只能查看正在执行的sql语句,对应历史记录,查看不到。好处是不用设置,不会保存。 -- use information_schema; -- show processlist; 或者: -- select * from information_sch
阅读全文
posted @
2019-03-26 11:57
山高似水深
阅读(12355)
推荐(0) 编辑