3 ms·
This really annoys me in PostgreSQL. Django encourages you to use joins across one-to-one relationships, but the query planner doesn’t know how to apply the lim
by jon_richards 5y ago
This really annoys me in PostgreSQL. Django encourages you to use joins across one-to-one relationships, but the query planner doesn’t know how to apply the limit before the join. It’s relatively simple to change select_related to prefetch_related on all paginated queries, but it still feels like the query planner should do it, especially for left joins (inner joins are slightly more complex to check).