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

Christian Kuhn lolli at schwarzbu.ch
Sun Jan 17 18:40:12 CET 2010


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


More information about the TYPO3-team-core mailing list