[TYPO3-core] RFC #12858: Feature: Provide a DB API to insert multiple rows at once

Xavier Perseguers typo3 at perseguers.ch
Fri Feb 5 22:28:53 CET 2010


Hi,

I just noticed that this patch was still pending. I assigned it (and its related DBAL patch) to myself and will take care of them soon.

Thanks for your patience.

Cheers

On 01/17/10 6:40 PM, Christian Kuhn wrote:
> Reminder #1
>
> @Xavier: Thanks for your work! Is it a review, yet?
>
> Christian Kuhn wrote:
>> This is SVN patch request.
>>
>> Type: Feature
>>
>> Branches: trunk
>>
>> BT reference: http://bugs.typo3.org/view.php?id=12858
>>
>> Problem:
>> It would be nice if t3lib_db provides an API to insert multiple rows at
>> once, using mysql's extended insert.
>>
>> Solution:
>> Add methods exec_INSERTmultipleRows and INSERTmultipleRows to t3lib_db.
>>
>> Notes:
>> There is a significant performance advantage if many rows are inserted
>> with one query instead of a query per row. This is especially useful for
>> the caching framework with db backend if fiddling with many tags, could
>> be used in other core parts as well, and might be useful for some
>> extensions.
>>
>> ext:enetcache has a performance unit test for this:
>> - svn co http://forge.typo3.org/repositories/show/extension-enetcache/trunk
>> - $TYPO3_CONF_VARS['SYS']['useCachingFramework'] = '1';
>> - Run enetcache testcases
>> - Apply this patch and the patch from 12859 (enables insert multiple in
>> the caching framework)
>> - Run testcases again
>>
>> For me "testSetManyTags" took 4 seconds before and 0.3 seconds after
>> (5000 rows handled).
>>
>> @Xavier: Could you take a look and figure out what needs to be done for
>> dbal? If other db's don't handle extended inserts it would be easy to
>> iterate over the rows and call exec_INSERTquery() each in dbal again.
>>
>> Regards
>> Christian


-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-team-core mailing list