Changes between Initial Version and Version 1 of Ticket #16603, comment 7
- Timestamp:
- Oct 29, 2026, 4:08:28 AM (3 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16603, comment 7
initial v1 3 3 When every lookup in the filter() call goes through the same relation, the subquery starts from the related model, e.g. `EXISTS(SELECT 1 FROM book WHERE rating >= 4 AND publisher_id = publisher.id)`, so the outer table isn't scanned twice. Otherwise it falls back to `EXISTS` on the model, correlated on pk. 4 4 5 On PostgreSQL 17 this took the reverse FK case from 69 ms to 24 ms (numbers in the PR). I haven't benchmarked MySQL yet; feedback welcome there. 5 On PostgreSQL 17 this took the reverse FK case from 69 ms to 24 ms (numbers in the PR). 6 MySQL 8.4 numbers are now in the PR: the reverse FK case goes from 7.6 s to 44 ms, and the full suite passes. 7 8 Feedback welcome there.