如何提高以下select语句执行速度
三色 2009-03-11 04:41:29 select sum(out_put) from eqp_output where area='1SMOD' and step like '1SM05%' and out_date='2009-3-10'
select sum(qty) from defect where area='1SMOD' and step like '1SM05%' and defect_date='2009-3-10'
select sum(out_put) from eqp_output where area='1SMOD' and step like '1SM05%' and out_date='2009-3-10' and product like 'MODEL%'
select sum(qty) from defect where area='1SMOD' and step like '1SM05%' and defect_date='2009-3-10' and product like 'MODEL%'
select DESCRIPTION ,sum(qty) as quanty from defect where area='1SMOD' and step like '1SM05%' and defect_date='2009-3-10' and product like 'MODEL%' group by DESCRIPTION order by quanty desc
以上语句如何提高速度?
在eqp_output上我已经创建了2个索引,1个包含area/step/out_date,另一个包含area/step/out_date/product
在defect上我已经创建了2个索引,1个包含area/step/defect_date,另一个包含area/step/defect_date/product