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

Xavier Perseguers typo3 at perseguers.ch
Wed Jul 7 13:00:58 CEST 2010


Hi,

> Xavier discussed several functions and I 'thought' we decided on using a
> compatible
> function that returns the integer ratehr then a other function that
> returns true or false.
> I feel we should use teh function that returns the integer, making it
> more compatible.

We decided to use FIND_IN_SET with an additional "!= 0" and the end to 
be the same with all compatibility functions. However I think we decided 
not to implement the real behavior of MySQL (returning the position of 
the item in the set) but simply return either 0 or something greater as 
the use in most if not all queries is to set the existence of an item in 
the list, not getting its position. But maybe this could be enhanced in 
all compatibility functions to have the same behavior.

> When Xavier comes back, I can test and further discuss that.

I returned but I've lots of work right now as I was out-of-office for 
the last 3 weeks. But it's on my radar.

>> For DBMSs which do not have a comparable function DBAL could convert
>> it to the hideous triple like construction.
>
> I think we should not do this, and we shouldn't support RDBMS that doesn't
> support stored procedures/functions, else we are ending up in a re-write
> SQL hell.

The core team agreed with my proposal a while ago to support:

- MySQL
- PostgreSQL
- Oracle
- MSSQL

However I don't want to explicitly prevent other DBMS to work. Basically 
what we decided is that "we" (DBAL- / Core- team) test those DBMS to 
ensure TYPO3 works on them.

I'm for keeping the triple like construction as fall-back. It was in use 
since "the beginning" and has proven to work even if not optimized at all.

Currently the patch I created for DBAL does this for Oracle but the 
whole should be properly tested and I'll have to see what may be done 
for Oracle.

Regards
Xavier


More information about the TYPO3-team-core mailing list