Let’s say I have a table containing 20 million rows and I have to scan through the entire table.
- How to do this efficiently in cockroach ?
- How does cockroach control the amount of rows to be returned? In case of postgres we have used
setFetchSizeto control the batch size. How to control the batch size in case of cockroach?
- I have seen the offset and limit as mentioned here. Let’s say I am processing in a batch of 10,000 by making multiple queries using LIMIT & OFFSET
SELECT id, name FROM accounts LIMIT 10000 OFFSET 10000;
How does cockroach maintains the offset ? If I have specified OFFSET 10000 then does cockroach has to traverse the first 10,000 rows to return the next batch.