问题:mysql生产db为5.5,测试库版本为5.6,每天定时mysqldump全量放在测试库上,在测试库上运行sql查询约1分钟可出来结果,40万行数据。
尝试过的解决办法,增加索引,提高tmp_table_size,都不能解决问题
sql内容,涉及内部数据安全,sql经过处理贴上来的 #图片
ringa_lee
A simple and clear method is to explain the sql in the production library and test library respectively and see the difference in the number of rows traversed
A simple and clear method is to explain the sql in the production library and test library respectively and see the difference in the number of rows traversed