#110513Improve LinkValidator record lookup performance with composite indexes
Description
The tx_linkvalidator_link table is queried repeatedly using these field combinations:
- record_uid and table_name
- record_pid and table_name
Without matching indexes, these queries require full table scans and become slower as the broken-link table grows.
Add the following composite indexes:
KEY record_uid_table (record_uid,table_name)
KEY record_pid_table (record_pid,table_name)
A synthetic SQLite benchmark with 100,000 rows measured:
- Record UID lookup: 2.273 ms → 0.010 ms (217× faster)
- Record PID lookup: 2.278 ms → 0.012 ms (191× faster)
These figures demonstrate the improvement to the indexed predicates; actual end-to-end LinkValidator performance also depends on joins, permission checks, and result processing.
Reviews 3
History 15
-
Gerrit Code Review pushed patch set 1 for main to change 95378 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-21T20:52:35+00:00" > 08/21/26, 20:52 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95378 <span data-processor="relativetime" data-value="2026-09-04T11:15:38+00:00" > 09/04/26, 11:15 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95641 <span data-processor="relativetime" data-value="2026-09-04T11:28:59+00:00" > 09/04/26, 11:28 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 95642 <span data-processor="relativetime" data-value="2026-09-04T11:29:19+00:00" > 09/04/26, 11:29 </span>
-
Wouter Wolters commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-04T12:20:09+00:00" > 09/04/26, 12:20 </span>
Applied in changeset commit:9892c9c896199ab8cf784bb18c2f41406010023e.