SQL优化主要还是看经验和对慢查询梳理,美团工具有一定作用(看github好像2年没更新了)https://github.com/Meituan-Dianping/SQLAdvisor表结构规范可以用inception检查(闭源了,老的还能用)配置文件优化,一般来说就几个参数需要优化,其他可以不动https://github.com/major/MySQLTun...
对同一个column,不能再create另一个index
runstats后,可以使用 db2advis 让优化器给出 合适的索引 建议。
"indexing or not" depends on queries.