[TYPO3] Slow query

Mauro Lorenzutti mauro.lorenzutti at webformat.com
Wed Sep 27 15:56:52 CEST 2006


Hi Lukas,

> My web hotel gave me an alert for a slow SQL query that took 16 seconds.
> When I ran the same question in PHPmyAdmin, it took 6 seconds, which is
> shorter but still pretty long.

> I guess the query came from macina-searchbox. How can I speed it up?

> Here's the query:
> SELECT IR.phash
> FROM index_words IW,
> index_rel IR,
> index_section ISEC
> WHERE
> IW.baseword LIKE '%ängsholmmen%'
> AND IW.wid=IR.wid
> AND ISEC.phash = IR.phash
> AND ISEC.rl0 IN (130)
> AND is_stopword=0
> GROUP BY IR.phash;

I think you can change the query using one or two JOIN.

Regards,
 Mauro Lorenzutti


e-mail:  mauro.lorenzutti at webformat.com

---------------------------------------------------------
WEBFORMAT srl | Corte Europa, 12 | I-33097 SPILIMBERGO PN
     Tel +39-0427-926.389  --  Fax +39-0427-927.653
       info at webformat.com  --  www.webformat.com
---------------------------------------------------------




More information about the TYPO3-english mailing list