home / django_tickets / tickets

tickets: 8769

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
8769 2008-09-01 19:19:14 2012-06-13 06:43:33 2022-03-06 03:43:07.426433 Accepted closed Database layer (models, ORM) Cleanup/optimization Normal dev fixed Slightly over-aggressive join promotion in SQL for ordering Right now, we promote any table join used in the ordering portion to an outer join if it potentially contains NULL values (the corresponding Django field has `null=True`). There are some cases where this is unnecessary. If we already used that join in the filter statements and didn't make it an outer join at that point, it's because we are already filtering out the null values, so an inner join still won't lose any results in the ordering. Thus, we should only promote joins for ordering if we needed to add that join for the ordering (this means `self.alias_refcount[...] == 1`, or something else that's easily detectable). Noting this so I don't forget. Don't want to introduce new bugs at the moment and it's a bit of an edge case, so it can wait until post-1.0. mtredinnick mtredinnick   0 0 0 0 0 0
Powered by Datasette · Queries took 61.688ms