Review main Abandoned

96585[TASK] Remove standalone deleted index from sys_file_reference

Wolfgang Klinger CR -1 V 0 Easy +0 −1 updated 10/14/26, 16:34

Commit message

A single-column index on the "deleted" flag has no selectivity,
and every core query that filters by "deleted" also filters by
"pid", which the "parent" index (pid, deleted, hidden) covers.
The index only costs write time.

Existing installations keep the index until the "remove"
suggestion in the Database Analyzer is applied.

Review

  • Code review CR -1
    • Wouter Wolters -1
  • Verified V 0
    • core-ci +1 CI

Issues 1

Files 1

Review log 34

  1. Wolfgang Klinger uploaded patch set 1 10/10/26, 05:08

  2. core-ci voted on patch set 1 V +1 10/10/26, 05:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110750

  3. Wouter Wolters commented on patch set 1 CR -1 10/14/26, 16:21

    Your assumption is incorrect. Not all queries use pid in the where clause. - typo3/sysext/recycler/Classes/Service/RecyclerService.php:81 counts deleted records across the entire table: SELECT COUNT(uid) FROM sys_file_reference WHERE deleted <> 0; - typo3/sysext/recycler/Classes/Task/CleanerTask.php:81 deletes records using deleted = 1 and a timestamp cutoff, without a pid constraint.
  4. Wolfgang Klinger abandoned the change 10/14/26, 16:34

    You are right, I missed the recycler queries.