#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 David Sanders):
The `MATERIALIZE` in the expensive plan indicates that Postgres doesn't
think it has enough memory to do something more efficient. (Sometimes
Postgres will choose something less optimal in order to materialise.)
Another thing to try is turning off materialisation to see what plan it
uses:
{{{
SET enable_material = 'off';
}}}
If it's able to use a more efficient plan then you could try adjusting
your memory settings/adding more RAM.
--
Ticket URL: <https://code.djangoproject.com/ticket/34597#comment:4>
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/01070188670385f6-5d6bed03-388c-41ed-b1ed-01076021ddd5-000000%40eu-central-1.amazonses.com.