SELECT `id`,`name`,`mobile`,`sex`,`status`,`file_id`,`department_id`,`user_id`,`customer_type_id`,`age`,`remarks`,`is_house`,`is_car`,`is_insurance`,`money_demand`,`last_time`,`create_time`,`allot_time`,`city`,`comment`,`is_read`,`reset_time`,`memo` FROM `crm_customer` WHERE  `is_rubbish` IS NULL  AND `is_public` = 1  AND `is_quit` IS NULL  AND `is_deleted` = 0  AND `department_id` IN (119,120,121,118)   ORDER BY last_time desc LIMIT 120,20;

mysql已经增加了查询字段的联合索引和last_time字段的索引,但是explain不走索引,增加了mysql配置项innodb_buffer_pool_size的大小,参考链接
https://card.weibo.com/article/m/show/id/2309404849143448469686

发表评论

邮箱地址不会被公开。 必填项已用*标注