Opened 7 years ago

Closed 7 years ago

Last modified 7 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
Pull Requests:9365 merged

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 by Dražen Odobašić, 7 years ago

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

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

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

comment:3 by Tim Graham, 7 years ago

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 by François Freitag, 7 years ago

Cc: François Freitag added

comment:5 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In d97f026a:

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

comment:6 by Tim Graham <timograham@…>, 7 years ago

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 by Tim Graham <timograham@…>, 7 years ago

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