[TYPO3-core] RFC: performance enhancement for tstemplate/cache_pagesection

Dmitry Dulepov typo3 at accio.lv
Tue Aug 29 10:29:14 CEST 2006


/* I am starting to post performance enhancement patches :) */

This is SVN patch request.

Problem: database calls in the t3lib/class.t3lib_tstemplate.php are not 
optimal and seriously impact mysql performance. There is a query that 
deletes entry from cache_pagesection and second query reinserts the 
entry with the same primary key. The problem is that this specific 
delete query takes over 20 seconds on the InnoDb engine (default for 
mysql>4.x) at peak hours on a server with lots of pages. This does not 
depend on external or database cache for pages, it is always so. Slow 
query log is filled with these queries (many of them per day).

Solution: change DELETE/INSERT to UPDATE/INSERT_on_update_failure. I 
have this patch running in production for a week and had only two 
entries about cache_pagesection (for 6 seconds both) since that time.

Patch is attached.

Dmitry Dulepov

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tstemplate_perf.txt
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060829/b17ace42/attachment.txt 

More information about the TYPO3-team-core mailing list