#30256: autocomplete_fields cause one or two extra queries for each field wth
foreign key or many to many relation
--------------------------------------+------------------------------------
Reporter: George Tantiras | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: autocomplete | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by George Tantiras):
I cannot reproduce the issue using PostgreSQL-11.5.
Currently, Django Debug Toolbar reports the same number of queries when
using dal3, django-autocomplete or "no autocomplete".
However, there is a difference:
* When using dal3 or "no autocomplete" a query appears (it was not present
when I reported this issue):
{{{
DECLARE "_django_curs_140333492991744_3" NO SCROLL CURSOR WITH HOLD FOR
SELECT ••• FROM "inlines_master" WHERE "inlines_master"."id" IN (1)
}}}
* Django autocomplete reatains its behaviour, it does not produce the
above query rather than a proper SELECT as expected (the reason for
reporting this issue):
{{{
SELECT ••• FROM "inlines_master" WHERE "inlines_master"."id" IN (1)
}}}
Is there something right happening or something wrong?
--
Ticket URL: <https://code.djangoproject.com/ticket/30256#comment:9>
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/066.2979b7cd16a06237080ab316156266f7%40djangoproject.com.