[TYPO3-core] RFC #13945: Bug: Missing key on l18n parent in tt_content table
Christian Kuhn
lolli at schwarzbu.ch
Mon Mar 29 14:31:21 CEST 2010
This is a SVN patch request.
Type: bugfix
Branches: trunk
BT: http://bugs.typo3.org/view.php?id=13945
Problem:
t3lib_BEfunc::translationCount issues a query like 'SELECT COUNT(*) FROM
tt_content WHERE l18n_parent=123 AND sys_language_uid!=0 AND deleted=0'.
EXPLAIN shows no usable key for this type of query.
Solution:
Add key on l18n_parent.
Notes:
This is especially useful for the list module which calls this method
for each listed tt_content record.
I decided against a combined index as there are several other queries
with l18n_parent in its where part but different additional fields.
This profiling was done with a happy little extension called
'mf_mysql_profiler' that xclasses t3lib_db to normalize and log queries,
together with a backend module to analyze them. I encouraged the author
to upload it to forge.
Regards
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13945_01.diff
Type: text/x-patch
Size: 391 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100329/3431daa3/attachment-0001.bin>
More information about the TYPO3-team-core
mailing list