标签: mysql optimization
select count(1) total from Leads where originaldate = curdate() and campaign = 78;
我已经索引了该表的原始日期列
答案 0 :(得分:0)
INDEX(campaign, originaldate)
假设orignaldate的类型为DATE,则该复合索引可以采用任意顺序。
orignaldate
DATE