Issue Bug Resolved

#105998Loading of Reports-Module very slow

Ingo Hollmann 01/28/25, 14:18 updated 09/22/26, 12:40

Description

Today I stumbled accross some odd behavior.
In a TYPO3 v11.5.42 Installation (I think this can happen in newer Versions too).
Having a big sys_refindex-Table:
clipboard-202501281511-jkp9f.png

When opening the reports-modul I see this query in the db-processlist wich is running extremly long (sometimes > 3 minutes):

SELECT count(*) FROM sys_refindex;

Here is the source of the query.
https://github.com/TYPO3-CMS/reports/blob/65af2750e39a5941845334566be9bfbc853aad28/Classes/Report/Status/ConfigurationStatus.php#L79

Changing this to a simple select (as in my understanding all informaiton needed is if there is any row inside this table:

SELECT hash FROM `sys_refindex` LIMIT 1

Would bring some speedup in this case.

I know, usually count(*) queries are fast, but there seems to be some special cases when those can slow down a system (see https://www.percona.com/blog/why-select-count-from-table-is-sometimes-very-slow-in-mysql-or-mariadb/)

Reviews 2