#35559: Calling list() on an empty sliced union still causes a database query
-------------------------------------+-------------------------------------
Reporter: Lucidiot | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"9cb8baa0c4fa2c10789c5c8b65f4465932d4d172" 9cb8baa0]:
{{{#!CommitTicketReference repository=""
revision="9cb8baa0c4fa2c10789c5c8b65f4465932d4d172"
Fixed #35559 -- Avoided unnecessary query on sliced union of empty
queries.
While refs #34125 focused on the SQL correctness of slicing of union of
potentially empty queries it missed an optimization opportunity to avoid
performing a query at all when all queries are empty.
Thanks Lucidiot for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35559#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070190c9c5a7d6-cddabe81-a1a0-4bb7-894e-99f26be8d1c2-000000%40eu-central-1.amazonses.com.