[TYPO3-english] Slow Queries From TT-News

Muriel le Pair typo3 at strangefruit.nl
Mon Nov 14 17:44:01 CET 2011


On 10-11-11 11:12, Victor Livakovsky wrote:
> As far, as I understood, these part of queries are generated by
> enableFields() of tslib_cObj class, which comes from core, and, I
> believe, core members know, what they are doing.

If these queries are really produced by the core I seriously doubt that 
they know what they are doing (sorry, I don't mean to offend anybody, 
but the example query really sucks.
It does however explain why uncached TYPO3 pages are so terrible slow..

It's no problem to use LIKE, but if you are using LIKE with a wildcard 
at the beginning (LIKE '%,0') MySql is unable to use the index. 
http://dev.mysql.com/doc/refman/5.1/en/mysql-indexes.html

> Most I'm scared about "AND tt_news.pid IN(835,2905,...)" - there is
> really large number of pids. You better place all of your news records
> into one folder and set pid to it with zero recursion level.

In my humble opinion LIKE '%,0' is a much bigger problem it shouldn't be 
used.

To speed up the site you could install the extension 'cachemgm' and set 
a scheduler to cache the pages automatically at night.


--
Kind regards,

Muriel le Pair



More information about the TYPO3-english mailing list