[TYPO3-dev] strange enableFields SQL with T3 4.0

Martin Schoenbeck ms.usenet.nospam at schoenbeck.de
Thu Apr 13 15:14:58 CEST 2006


Hi Florian,

Florian Schaeffer schrieb:

> Hello all,
> 
> Martin Kutschker schrieb:
>>>> What would a CONCAT do? The statement above tests if fe_group starts 
>>>> with -2, ends with -2 has a -2 in it or is -2.
> 
>>> AND CONCAT(',', fe_group, ',') LIKE '%,2,%'
> 
> As this SQL statement clearly simplifies the query and gains much more 
> performance, one have to keep in mind that CONCAT is not ANSI-SQL and 
> that e.g. Postgres doesn't about that function.

Why do you expect this statement to perform better than the original?
AFAICS it also has no chance to use an index. Once the data is in memory it
will not make a big difference whether you do a concatenation and one LIKE
or three LIKE and a compare. To better performance you'll have to find a
method to evaluate without loading. Normalizing the data would do that.

Martin
-- 
Bitte nicht an der E-Mail-Adresse fummeln, die paßt so.




More information about the TYPO3-dev mailing list