[Django] #28817: Use server side cursors for values and values_list

5 views
Skip to first unread message

Django

unread,
Nov 19, 2017, 9:54:58 AM11/19/17
to django-...@googlegroups.com
#28817: Use server side cursors for values and values_list
-------------------------------------+-------------------------------------
Reporter: Dražen | Owner: nobody
Odobašić |
Type: Bug | Status: new
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Server side cursors are only initialized for `ModelIterable` class. We
should do the same for other `BaseIterable` classes (`ValuesIterable`,
`ValuesListIterable` and `FlatValuesListIterable`).

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

--
Ticket URL: <https://code.djangoproject.com/ticket/28817>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 19, 2017, 9:55:18 AM11/19/17
to django-...@googlegroups.com
#28817: Use server side cursors for values and values_list
-------------------------------------+-------------------------------------
Reporter: Dražen Odobašić | Owner: Dražen
| Odobašić
Type: Bug | Status: assigned
Component: Database layer | Version: master
(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
-------------------------------------+-------------------------------------
Changes (by Dražen Odobašić):

* owner: nobody => Dražen Odobašić
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/28817#comment:1>

Django

unread,
Nov 19, 2017, 10:17:41 AM11/19/17
to django-...@googlegroups.com
#28817: Use server side cursors for values and values_list
-------------------------------------+-------------------------------------
Reporter: Dražen Odobašić | Owner: Dražen
| Odobašić
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Dražen Odobašić):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28817#comment:2>

Django

unread,
Nov 20, 2017, 10:17:04 AM11/20/17
to django-...@googlegroups.com
#28817: Use server-side cursors for QuerySet.values() and values_list()

-------------------------------------+-------------------------------------
Reporter: Dražen Odobašić | Owner: Dražen
| Odobašić
Type: Bug | Status: assigned
Component: Database layer | Version: 1.11

(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* version: master => 1.11
* stage: Unreviewed => Accepted


Old description:

> Server side cursors are only initialized for `ModelIterable` class. We
> should do the same for other `BaseIterable` classes (`ValuesIterable`,
> `ValuesListIterable` and `FlatValuesListIterable`).
>
> The idea is that you could then use
> `QuerySet.values_list('id').iterator()` and actually utilize server side
> cursors.

New description:

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

([https://groups.google.com/d/topic/django-
developers/U7PcZxXnb6Y/discussion django-developers discussion]

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

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28817#comment:3>

Django

unread,
Nov 20, 2017, 3:21:48 PM11/20/17
to django-...@googlegroups.com
#28817: Use server-side cursors for QuerySet.values() and values_list()
-------------------------------------+-------------------------------------
Reporter: Dražen Odobašić | Owner: Dražen
| Odobašić
Type: Bug | Status: assigned
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by François Freitag):

* cc: François Freitag (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/28817#comment:4>

Django

unread,
Nov 21, 2017, 10:51:50 AM11/21/17
to django-...@googlegroups.com
#28817: Use server-side cursors for QuerySet.values() and values_list()
-------------------------------------+-------------------------------------
Reporter: Dražen Odobašić | Owner: Dražen
| Odobašić
Type: Bug | Status: closed

Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"d97f026a7ab5212192426e45121f7a52751a2044" d97f026a]:
{{{
#!CommitTicketReference repository=""
revision="d97f026a7ab5212192426e45121f7a52751a2044"
Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after
values() and values_list().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28817#comment:5>

Django

unread,
Nov 21, 2017, 11:01:32 AM11/21/17
to django-...@googlegroups.com
#28817: Use server-side cursors for QuerySet.values() and values_list()
-------------------------------------+-------------------------------------
Reporter: Dražen Odobašić | Owner: Dražen
| Odobašić
Type: Bug | Status: closed
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"286120444f0fc5aa901dfc36a3f864e94beb2ffb" 2861204]:
{{{
#!CommitTicketReference repository=""
revision="286120444f0fc5aa901dfc36a3f864e94beb2ffb"
[2.0.x] Fixed #28817 -- Made QuerySet.iterator() use server-side cursors
after values() and values_list().

Backport of d97f026a7ab5212192426e45121f7a52751a2044 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28817#comment:6>

Django

unread,
Nov 21, 2017, 11:11:46 AM11/21/17
to django-...@googlegroups.com
#28817: Use server-side cursors for QuerySet.values() and values_list()
-------------------------------------+-------------------------------------
Reporter: Dražen Odobašić | Owner: Dražen
| Odobašić
Type: Bug | Status: closed
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"7f4e17451135a8aee597e24aac4670a6d8860047" 7f4e1745]:
{{{
#!CommitTicketReference repository=""
revision="7f4e17451135a8aee597e24aac4670a6d8860047"
[1.11.x] Fixed #28817 -- Made QuerySet.iterator() use server-side cursors
after values() and values_list().

Backport of d97f026a7ab5212192426e45121f7a52751a2044 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28817#comment:7>

Reply all
Reply to author
Forward
0 new messages