我有个sql查询语句:
select count(1)
from task_basic tb
left join task_catalog tc on tb.CATALOG_ID = tc.CATALOG_ID
and tc.is_del = 0
where tb.is_del = 0
and IFNULL(tb.YWCODE,'0' ) != '0'
-- and (tc.BUSINESSCODES = 'SJ')
此时查询时间是3秒多,当在下面注释的条件放开时,查询时间就变成将近20秒了,索引也都加了
求大神帮忙看看要怎么优化,感激不尽
调整了Mysql内存,问题解决