Bug #101121
openPoor performance with INLINE + children having "label_alt" being set to a relation (n:1) column
0%
Description
I've noticed massive performance issues with INLINE relations when childrens have "label_alt" set to fields which are relations (n:1) themselves. Current scenario is:
- There are 400 "seminars", 4.000 "events", 20 "locations".
- Database layout is "seminars" <1:n> "event" <n:1> "location.
- TCA form for "seminar" contains "events" defined as INLINE, and "event" contains "location" as SELECT SINGLE.
- Table "event" has "label_alt => date, location, seminar" set (last two are n:1 relations).
Now opening the backend edit form for a "seminar" (which contains ~ 100 inline "events") leads to a never ending request on live system ("gateway timeout" on DDEV local). On database level, nothing could be improved by setting additional indices for all relationĂ¡l columns. As soon as "label_alt" is removed, there are no performance issues. In addition, this only happens when used within an INLINE relation. In plain list view for "event", this "label_alt" setting containing relations doesn't cause any problems.
I stumbled across this issue several times in the past. As far as is remember it always happens when "label_alt" refers to relations in combination with INLINE usage. I suppose the database queries in behind are not really good and perhaps they simply deal wrong with relations or don't use plain left joins ("event" <n:1> "location").
The only way i could work around this was, to use a custom label user function for the "event" label, which does "BackendUtility::getRecord()" for "location" and "seminar" in behind. So the 100 inline records themselves are not the problem and in general, we are not talking about a huge amount of records at all.
Updated by Gerrit Code Review almost 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review almost 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review almost 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review almost 1 year ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 6 months ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 6 months ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 4 months ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 4 months ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871