Disabling paging for a single cqlengine query

459 views
Skip to first unread message

Marc Zbyszynski

unread,
Aug 3, 2015, 4:46:00 PM8/3/15
to DataStax Python Driver for Apache Cassandra User Mailing List
Hello there!

I'm working with C* 2.2 and python driver 2.6 to try to run a query that takes advantage of the new retrieval of rows using IN, as described here: http://docs.datastax.com/en/cql/3.3/cql/cql_using/useQueryIN.html

The CQL documentation stipulates that if you are going to use this feature in conjunction with order_by, then you need to disable auto-paging. I'm assuming (based on the testing I've done so far) that this applies to queries executed via the python client as well.

From what I understand, the way to disable paging for a specific query is to set fetch_size=None when executing the statement, but so far I haven't figured out how to do this for a single query using the cqlengine Object Mapper API (I know that .

Does anyone know how I can do this (other than setting default_fetch_size when calling connnection.setup())? Or is this not currently supported?

Thanks for your help,

Marc

Adam Holmberg

unread,
Aug 4, 2015, 1:00:58 PM8/4/15
to python-dr...@lists.datastax.com
Marc,

You are correct on all points. The only way to get this behavior presently is to set the default. Fetch size was considered less important because cqlengine in its current implementation materializes the entire list upfront (the benefits of paging are forgone). This is a good corner case to be aware of, where fetch size affects the type of ordering. Thanks for bringing it up. The ticket where this will be implemented is here:

I'll add a link to this thread for reference.

Regards,
Adam Holmberg

To unsubscribe from this group and stop receiving emails from it, send an email to python-driver-u...@lists.datastax.com.



--

Reply all
Reply to author
Forward
0 new messages