#26338: Getting Queryset item by index with PostgreSQL behaves randomly
-------------------------------------+-------------------------------------
Reporter: pawelad | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by timgraham):
I believe `all_objects[index1]` and `all_objects[index2]` are running two
separate queries. When you first cast to a list, you only have one query.
Please verify by checking
[https://docs.djangoproject.com/en/stable/faq/models/#how-can-i-see-the-
raw-sql-queries-django-is-running connections.queries].
--
Ticket URL: <https://code.djangoproject.com/ticket/26338#comment:3>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.b8f0790d219c72e85c3316fc03d2f34c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.