Files
openproject/app
Kabiru Mwenja f94d7b0bfc Resolve the changes-filter predecessor once in a journals CTE
The :only_changes filter re-seeked each journal's predecessor in every EXISTS
branch (~7 LATERAL lookups per row). A CTE now shadows the journals table,
exposing predecessor_id/predecessor_data_id once per row, and each branch reads
those columns instead. On a 703-journal work package this cuts the COUNT from
~1.13M to ~35K shared buffers.
2026-06-09 10:25:21 +03:00
..