这几天开发尤其重视数据库索引的优化,是一件好事情,开发特意提过来几个要删除的索引,oh!我的佛陀呀!历史上出现过因为评估不到位,删索引引发故障的案例。那么有什么办法可以评估索引是否合理呢?

percona有两个工具pt-duplicate-key-checkerpt-index-usage

sudo pt-index-usage slow.log --host localhost --socket=/home/mysql/run/mysql.sock 

sudo pt-duplicate-key-checker --host localhost --socket=/home/mysql/run/mysql.sock --databases=dbname --tables=tbname 

 

相关文章:

  • 2021-04-15
  • 2021-08-27
  • 2021-05-23
  • 2021-06-19
  • 2021-06-25
  • 2021-10-21
猜你喜欢
  • 2022-12-23
  • 2021-12-29
  • 2021-11-08
  • 2022-01-19
  • 2022-01-08
  • 2021-10-25
  • 2021-04-08
相关资源
相似解决方案