反馈人:李冠
严重级别:严重
所属项目:allegro
问题原因:当前查询,执行了200多秒,强制指定索引有问题,idx_status是单字段索引,SQL为(SELECT id,source_id,queue_id,create_time,result_url,sku,source_sku,title,price,ean,category_id,category_name,picture_url FROM t_publish_detail_allegro force index (idx_status) WHERE source_id = 18348 and status = 6 ORDER BY id ASC limit 500;)
解决方案:方案一:建议增加idx_source_id_status(source_id,status)索引,并在SQL中的指定索引切换为idx_source_id_status;方案二:(因为t_publish_detail_allegro是大表)在方案一的基础上把SQL调整为 select a,b,c from t_publish_detail_allegro t join (select id from t_publish_detail_allegro where 条件) tt on tt.id=t.id
重现步骤
