本博客是学习慕课网 性能优化之mysql优化的笔记与总结,会不断的进行内容补充。连接地址:http://www.imooc.com/learn/194
1.数据准备
使用mysql官网的示例数据库sakila,下载地址:https://dev.mysql.com/doc/index-other.html
帮助文档:https://dev.mysql.com/doc/sakila/en/sakila-installation.html
mysql版本是:5.7.16
2.查看数据库服务器是否开启慢查询日志:
show variables like 'slow_query_log';
如果为OFF代表没有开启慢查询日志,ON代表开启了3.开启慢查询日志