[TYPO3-core] RFC #14818: Performance: Use mysql find_in_set-function in t3lib_db->listQuery()

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Jul 16 21:41:20 CEST 2010


Xavier Perseguers schrieb am 16.07.2010 15:36:
> Hi,
> 
>> Problem:
>> The function listQuery() uses a like-construct to find a value in a
>> comma-seperated list.
>> Mysql has a internal function for this called 'find_in_set'
>> This is 2.5 times faster.
>>
>> Solution:
>> change the t3lib_db->listQuery(), using the mysql-function find_in_set
>> instead of the like-construct.
>> adding the funcion listQuery() to the dbal ux_t3lib_db class with the
>> like-construct.
> 
> Committed attached patches to:
> 
> - Core trunk (rev. 8197)
> - DBAL trunk (rev. 35747)
> 
> Thanks to Caspar for this patch and to others for the interesting points
> in discussion.

Hi Xavier,

could you explain a bit this DBAL diff?

http://forge.typo3.org/projects/extension-dbal/repository/revisions/35742/diff

The whole "switch (TRUE)" case with nested if ($functionMapping) and
purposedly missing breaks is a bit confusing if not misleading.

Since I don't understand it well, I cannot propose a patch to solve it,
but maybe you understand my trouble in understanding it and find a
solution for that part of the code? I would be thankful! :)

And maybe also explain the $functionMapping argument that is available
in several functions?

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list