Issue Task Resolved

#110518Improve Indexed Search parent hash cleanup performance

Wouter Wolters 08/21/26, 21:18 updated 09/01/26, 20:40

Description

Indexer::removeOldIndexedPages() deletes records from index_section using the phash_t3 column.
Because this column is not currently indexed, the database must scan the entire table.

Add an index for index_section.phash_t3 to make these cleanup queries efficient as the search index grows.

Benefits:

- Avoids full table scans during old-page cleanup
- Improves a synthetic 100,000-row query from approximately 1.925 ms to 0.002 ms (~774× faster)
- Requires only one additional schema index
- Existing Indexed Search functional tests continue to pass

Reviews 1

History 12

  1. Wouter Wolters commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-01T20:40:08+00:00" > 09/01/26, 20:40 </span>

    Applied in changeset commit:cb0b2acd8b72c997cf34e9827d28728adff0fe06.