#110529TYPO3 v14 Page Module slow due to full table scan in getRecordTranslations()
Description
Description
On TYPO3 v14 the Page module becomes very slow on pages with many content elements.
The main bottleneck is the translation lookup triggered by `GridColumnItem::getDeleteMessage()` for every `tt_content` record.
Generated query:
SELECT *
FROM `tt_content`
WHERE (
(`l10n_source` = 45419)
OR (
(`l10n_source` = 0)
AND (`l18n_parent` = 45419)
)
)
AND (`sys_language_uid` > 0)
AND (`deleted` = 0)
AND (`t3ver_wsid` = 0)
AND (
(`t3ver_oid` = 0)
OR (`t3ver_state` = 4)
);
With ~66k `tt_content` records, `EXPLAIN ANALYZE` shows a full table scan:
-> Table scan on tt_content
actual time=0.043..160
rows=66033
This costs around 100–200 ms per content element.
Page module request time in our case:
before: ~10–11 s after adding index: ~0.7 s
Existing indexes
Relevant existing indexes:
(l18n_parent, sys_language_uid)
(l10n_source)
(t3ver_oid, t3ver_wsid)
(pid, sorting)
Workaround
This index removes the full table scan:
CREATE INDEX idx_tt_content_translation_lookup
ON tt_content (
l10n_source,
l18n_parent,
sys_language_uid,
deleted,
t3ver_wsid
);
Additional observations
`getRecordTranslations()` can receive a `RecordInterface`. In that case it also adds `pid = ?` to the query.
`GridColumnItem::getDeleteMessage()` currently only passes the UID. Passing the record instead may make the query more selective.
Also, the translation lookup is only needed for the delete confirmation message, but this message is prepared eagerly for every content element during Page module rendering:
data-content="{item.deleteMessage}"
This means the lookup is executed even if the delete action is never used.
It may therefore be worth either:
- adding a suitable default index,
- passing the full record including PID,
- or avoiding the eager translation lookup when rendering the Page module.
Reviews 2
Related issues 1
History 35
-
Georg Ringer changed Related to #110454 <span data-processor="relativetime" data-value="2026-08-24T19:12:55+00:00" > 08/24/26, 19:12 </span>
-
Georg Ringer commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-08-24T19:13:18+00:00" > 08/24/26, 19:13 </span> -
Nikolas Hagelstein commented <span data-processor="relativetime" data-value="2026-08-25T17:27:41+00:00" > 08/25/26, 17:27 </span>
Georg Ringer wrote in #note-2:
> thanks!
> can you test the changes of #110454 if this fits for you already?Yes, works :)
Though: the idea of eagerly fechting the whole delete message should be adressed anyway. -
Gerrit Code Review pushed patch set 1 for main to change 95453 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2026-08-27T14:27:57+00:00" > 08/27/26, 14:27 </span> -
Gerrit Code Review pushed patch set 1 for main to change 97616 <span data-processor="relativetime" data-value="2026-11-13T14:47:04+00:00" > 11/13/26, 14:47 </span>
thanks!
can you test the changes of #110454 if this fits for you already?