Task #90419
closedImprove performance of DatabaseRecordList->generateList()
100%
Description
When checking if there are any rows to render, a DB query fetches the uids of all records instead of only one. This leads to perceptible bad performance of the backend list view with >100k rows.
File in current master:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
Current:
$firstRow = $queryBuilder->select('uid')
->from($tableName)
->execute()
->fetch();
Could be:
$firstRow = $queryBuilder->select('uid')
->from($tableName)
->setMaxResults(1)
->execute()
->fetch();
This behavior exists at least since TYPO3 8.
Backports to version 9 and 8 are similarly easy changes, but e.g. the code for TYPO3 8 recides in AbstractDatabaseRecordList.
Updated by Georg Ringer almost 5 years ago
hey!
thanks for creating the issue! what about using a real count query instead? $firstRow
is never used anyway?
Updated by Gerrit Code Review almost 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63316
Updated by Gerrit Code Review almost 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63316
Updated by Gerrit Code Review almost 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63296
Updated by Georg Ringer almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e89a057de59e4dcfd2f602ac34fb04e3dd1ab4b4.