Using server side cursors for values and values_list

101 views
Skip to first unread message

Dražen Odobašić

unread,
Nov 17, 2017, 11:27:13 AM11/17/17
to Django developers (Contributions to Django itself)
Hi,

at the moment `chunked_fetch` (server side cursors) are only initialized for
ModelIterable class. Is there any reason why we should not 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 use server side cursors.

Dražen

Josh Smeaton

unread,
Nov 18, 2017, 6:07:04 PM11/18/17
to Django developers (Contributions to Django itself)
I can't think of any reasons why not to do this off the top of my head. Have you looked into the code? Is there any technical reason you can see that might prevent chunked fetching from working there?

Dražen Odobašić

unread,
Nov 20, 2017, 9:12:32 AM11/20/17
to django-d...@googlegroups.com
Hi,

the change seems relatively simple: https://code.djangoproject.com/ticket/28817,
and it does not break any existing tests.

Dražen
Reply all
Reply to author
Forward
0 new messages