Issue Bug Closed

#109561Add index for pages.content_from_pid

Christian Heindl 04/13/26, 07:24 updated 04/21/26, 11:30

Description

Hello everybody,

we have a large multisite installation of TYPO3 running and we were wondering why the backend editing got really slow. After a short analysis we found out, that PageLayoutController::getPageLinksWhereContentIsAlsoShownOn is querying the pages table with a filter for the content_from_pid column. As we have around 660.000 enabled pages within the installation, the query was quite slow with an index on that column (as 660K records had to be scanned on each request of the content element overview of a page).

We simply added a index like the following to the pages table and the request duration to the content element overview pages dropped by 66%.

CREATE TABLE pages (
   KEY `content_from_pid` (`content_from_pid`),
);

Reviews 2

History 35

  1. Christian Kuhn commented <span data-processor="relativetime" data-value="2026-04-13T11:07:59+00:00" > 04/13/26, 11:07 </span>

    yeah. considering the fact this query is fired often in regular BE calls, and such an index does not hurt (much), i’m fine.

  2. Ravi Sachaniya commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-04-13T11:35:10+00:00" > 04/13/26, 11:35 </span>

    Applied in changeset commit:65088c513e30f584afa6b002771ffffa164298e8.