0

I'm using the Datastax Java driver and have a partition key that has around 750000 items that I'd like to iterate over. I currently hit a ReadTimeoutException. Will setting Statement#setFetchSize(2000) be all I need to do to avoid the timeout (assuming I have memory in my client, that is)? Or will I need to do the paging myself manually?

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
Ztyx
  • 14,100
  • 15
  • 78
  • 114

1 Answers1

0

Assuming you are using the driver with protocol v2 or higher, this should be all you need. Automatic paging will occur under the hood, returning up to 2000 rows at a time.

Adam Holmberg
  • 7,245
  • 3
  • 30
  • 53