#34597: Queryset (split) exclude's usage of Exists is significantly slower than
subquery
-------------------------------------+-------------------------------------
Reporter: Lorand Varga | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
Thank you for your report Lorand and for providing all these details. I'm
also curious about what might be causing these slowdowns.
Until we figure out what might be to blame for the materialization issues
I started looking into the unnecessary `AND "blog"."id" = "blog"."id"`
generation by generating the exact change in terms of SQL generation that
8593e162c9cb63a6c0b06daf045bc1c21eb4d7c1 resulting in.
The full result can be found
[https://gist.github.com/charettes/5256c4d52470a6f48f8955a92bce2135#file-
ticket-34597-sqlite-diff-L1010-L1025 in this gist] and the issue manifests
itself in two tests
1. [https://gist.github.com/charettes/5256c4d52470a6f48f8955a92bce2135
#file-ticket-34597-sqlite-diff-L1010-L1025
queries.tests.TestTicket24605.test_ticket_24605]
2. [https://gist.github.com/charettes/5256c4d52470a6f48f8955a92bce2135
#file-ticket-34597-sqlite-diff-L263-L280
queries.tests.ExcludeTests.test_ticket14511]
I should have some time tomorrow to dig into the issue further.
--
Ticket URL: <https://code.djangoproject.com/ticket/34597#comment:10>
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/010701886b0184a0-73da407f-5545-42e9-b390-3f1d633b09be-000000%40eu-central-1.amazonses.com.