Project

General

Profile

Actions

Bug #22341

closed

Missing key on l18n parent in tt_content table

Added by Christian Kuhn over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-03-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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 index 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 here as there are several other queries with l18n_parent in its where part but other additional field.
This profiling was done with a happy little extension called 'mf_mysql_profiler' that xclasses t3lib_db to normalize and log queries to a log table, together with a backend module to analyze them. I encouraged the author to upload it to forge.

(issue imported from #M13945)


Files

13945_01.diff (391 Bytes) 13945_01.diff Administrator Admin, 2010-03-29 14:25
13945_02.diff (407 Bytes) 13945_02.diff Administrator Admin, 2010-04-12 19:13

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #22789: Calls to t3lib_befunc::translationCount slow down backendClosed2010-06-02

Actions
Actions

Also available in: Atom PDF