这个查询需要 3 秒,我想让它运行得更快。请提供任何建议
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 );