Cassandra Fetch Size Limitation

595 views
Skip to first unread message

Mohammed Abuharb

unread,
Aug 31, 2016, 4:53:54 AM8/31/16
to DataStax PHP Driver for Apache Cassandra User Mailing List
Dears,
I have a very big database tables with couple of tens million records. My application needs to fetch large number of records but Cassandra gives me the limitation of fetching to 5000 results.
Using paging in PHP-Driver is not the best solution for my case.
How can I increase this Default-fetch-limit either by PHP or cassandra config files?

I am looking for your help.

Regards,

Leonan Carvalho

unread,
Aug 31, 2016, 8:53:29 AM8/31/16
to php-dri...@lists.datastax.com
Dears,

I'm using php-drive for a very short time, and 1st thing I percept was this limit, I tried do google a bit alot it and I don't found any sollution.

So, I developed a class to handler  Cassandra\FutureRows that may will help you.


But, I don't recommend you to fetch to much rows with php, or you will need a lot of memory for that.


Best.


José Leonan S. Carvalho
Analista Desenvolvedor  de Sistemas
j.leonan...@gmail.com
www.leonancarvalho.com
skype: jleonancarvalho
“Procurem deixar este mundo um pouco melhor do que o encontraram, e, quando chegar a hora de morrer, poderão morrer felizes sentindo que pelo menos não desperdiçaram o tempo e que procuraram fazer o melhor possível.
Deste modo estejam “bem preparados” para viver felizes e para morrer felizes.”
 - Lord Baden-Powell of Gilwell 


--
You received this message because you are subscribed to the Google Groups "DataStax PHP Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-driver-user+unsubscribe@lists.datastax.com.

Michael Fero

unread,
Sep 6, 2016, 5:11:08 PM9/6/16
to DataStax PHP Driver for Apache Cassandra User Mailing List
Mohammed,

By default paging is enabled and it is defaulted to 5000; https://github.com/datastax/php-driver/blob/7cd2b7f56b0c2ca6dcb18adab93aca7b3c473f17/features/README.md#result-paging. You can change that default limit using the cluster configuration options (http://datastax.github.io/php-driver/api/Cassandra/Cluster/class.Builder/#method.withDefaultPageSize) or you can modify it per statement execution with the ExecutionOptions (http://datastax.github.io/php-driver/api/Cassandra/class.ExecutionOptions/#method-__construct).

~Fero

Reply all
Reply to author
Forward
0 new messages