Bug #106037
openEXT:form Backend module can run into timeout on large sites
0%
Description
On a large setup with many sites (hundreds) and similar numbers of forms (483 in my example) and lots of references (+2000) the form backend module often runs into timeouts when simply loading the list of forms.
The culprit actually is the way
TYPO3\CMS\Form\Service\DatabaseService->getAllReferencesForFileUid()and consequently
TYPO3\CMS\Form\Service\DatabaseService->getAllReferences()tries to load these from sys_refindex
Here essentially a
SELECT ref_uid FROM sys_refindex WHERE softref_key='formPersistenceIdentifier' and ref_uid > 0;
is executed, which fails to match any index, resulting in a full table scan, grinding the task to a halt on large setups (sys_refindex has a count of 3 Million+ entries)
I added the following to my Sitepackage, solving the Problem:
CREATE TABLE sys_refindex (
KEY idx_softref_key (softref_key,ref_uid)
);
I am filing this for EXT:form / Form Framework as it is the only example I found where the sys_refindex is queried like that, but it could be something for the core as well, if the sys_refindex is intended to be used in this way.
Updated by Garvin Hicking 17 days ago
That sounds effective to use a key here. Would you like to propose a patch yourself maybe? Should be doable with an ext_tables.sql change only (in typo3/sysext/core/ext_tables.sql
line 235)?
Updated by Christian Kuhn 16 days ago
ยท Edited
please add it to ext:form ext_tables.sql, not to ext:core. There is an index for a similar query for ext:form already.