Cassandra Simba driver doesn't respect fetch size

113 Views Asked by At

I'm using CassandraJDBC42.jar and I added setFetchSize=200 and I tried to pull 100k data it took a while so I tried to setFetchSize=5000 and it took the same time

1

There are 1 best solutions below

2
Aaron On

Fetch size doesn't make the query go faster. It's a safeguard to keep the coordinator node from crashing while it pulls your 100k rows back.

If you want the query to perform better, look at adjusting the table's primary key so that the query only has to pull data from one node. And querying a (much) smaller amount of data will help as well.