草庐IT

MySQL 慢大查询

我有一个我想优化的大型查询,我已经优化了它,但它有时仍然很慢(>1s):selectcount(DISTINCTif(ps15.specificationin('AllSeason'),p.products_id,NULL))ascount1,count(DISTINCTif(ps15.specificationin('Winter'),p.products_id,NULL))ascount2,count(DISTINCTif(ps15.specificationin('Zomer'),p.products_id,NULL))ascount3,count(DISTINCTif(ps15