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
Asked
Active
Viewed 79 times
1
-
Welcome to Stack Overflow! A friendly note on how to ask good questions. The general guidance is that you (a) provide a good summary of the problem that includes software/component versions, the full error message + full stack trace; (b) describe what you've tried to fix the problem, details of investigation you've done; and (c) minimal sample code that replicates the problem. Cheers! – Erick Ramirez Aug 30 '22 at 13:02
1 Answers
0
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.

Aaron
- 55,518
- 11
- 116
- 132
-
-
@ayaahmed All of the drivers will work this way. Sometimes it's called "page size" with other drivers. – Aaron Aug 30 '22 at 15:18