性能调优之数据库(三)

数据库调优工具之Percona Toolkit

  安装:https://class.imooc.com/lesson/1260#mid=36674

  使用:https://class.imooc.com/lesson/1260#mid=36675

    1.pt-query-digest:用来分析慢查询日志

    2.pt-index-usage:用来查找到该删除的索引

    3.pt-variable-adviser:分析mysql的变量

SQL调优实战

  通过对foodie中search item功能sql的调优,从1380ms缩短到了100多ms,提升性能显著!

  1.消灭全表扫描 ALL

  2.消灭order by中的using filesort

  3.消灭group by 中的using temporary

  4.使用straight_join强制确定驱动表

数据库开发36条军规:https://class.imooc.com/lesson/1260#mid=36678

posted @ 2020-10-26 23:52  红嘴鲤鱼  阅读(96)  评论(0编辑  收藏  举报