Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#28817 closed Bug (fixed)

Use server-side cursors for QuerySet.values() and values_list()

Reported by: Dražen Odobašić Owned by: Dražen Odobašić
Component: Database layer (models, ORM) Version: 1.11
Severity: Normal Keywords:
Cc: François Freitag Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

Server side cursors are only initialized for ModelIterable class. We should do the same for other BaseIterable classes (ValuesIterable, ValuesListIterable and FlatValuesListIterable). (django-developers discussion

The idea is that you could then use QuerySet.values_list('id').iterator() and actually utilize server side cursors.

Change History (7)

comment:1 Changed 2 years ago by Dražen Odobašić

Owner: changed from nobody to Dražen Odobašić
Status: newassigned

comment:2 Changed 2 years ago by Dražen Odobašić

Has patch: set
Last edited 2 years ago by Tim Graham (previous) (diff)

comment:3 Changed 2 years ago by Tim Graham

Description: modified (diff)
Summary: Use server side cursors for values and values_listUse server-side cursors for QuerySet.values() and values_list()
Triage Stage: UnreviewedAccepted
Version: master1.11

comment:4 Changed 2 years ago by François Freitag

Cc: François Freitag added

comment:5 Changed 2 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In d97f026a:

Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after values() and values_list().

comment:6 Changed 2 years ago by Tim Graham <timograham@…>

In 2861204:

[2.0.x] Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after values() and values_list().

Backport of d97f026a7ab5212192426e45121f7a52751a2044 from master

comment:7 Changed 2 years ago by Tim Graham <timograham@…>

In 7f4e1745:

[1.11.x] Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after values() and values_list().

Backport of d97f026a7ab5212192426e45121f7a52751a2044 from master

Note: See TracTickets for help on using tickets.
Back to Top