这个查询需要3秒钟,我想让它运行得更快。 请提供任何建议如何优化这个sql查询
SELECT Concat(e.estimate1, '-', e.estimate2) AS estimateid,
e.estimatetype,
e.createdby,
e.estimateid AS estID,
e.`layoutnumber`,
sd.specno,
sd.samplenumber,
sd.numberon,
c.customerid,
c.custprosname,
c.`custtype`,
(SELECT Count(*)
FROM (SELECT e.estimate1
FROM `simpleestimatedetails` sd,
estimatemaster e,
`vcustomer_prospect` c
WHERE c.customerid IN (e.customernumber, e.prospectnumber)
AND (e.estimate1 LIKE '%1%')
AND (sd.`simpleestid` = e.estimateid)) AS counter) AS
counter
FROM `simpleestimatedetails` sd,
estimatemaster e,
`vcustomer_prospect` c
WHERE c.customerid IN (e.customernumber, e.prospectnumber)
AND (e.estimate1 LIKE '%1%')
AND (sd.`simpleestid` = e.estimateid);
使用[说明](http://dev.mysql.com/doc/refman/5.0/en/explain.html)来分析您的查询 – VeNoMiS
对不起,我没有那access.I猜上述查询doesnot需要任何description.we只需要使用不同的方法 – Samir
对不起,你被分配优化一个查询,你不能运行EXPLAIN?人们如何期待你这样做?你有没有一台开发机器(你有权利),可以测试重写,索引和分析? –