摘要:
1, 查看MySQL服务器配置信息 mysql> show variables; 2, 查看MySQL服务器运行的各种状态值 mysql> show global status; 3, 慢查询 mysql> show variables like '%slow%'; + + + | Variable 阅读全文
摘要:
1. 为查询缓存优化查询 当有很多相同的查询被执行了多次的时候,这些查询结果会被放到一个缓存中,这样,后续的相同的查询就不用操作表而直接访问缓存结果了。 2. EXPLAIN SELECT 查询 使用 EXPLAIN 关键字可以知道MySQL是如何处理SQL语句的。这可以查询语句或是表结构的性能瓶颈 阅读全文