i am continuing on the question i previously asked https://community.datastax.com/questions/9978/how-pagination-is-done-internally.html#
since there was a 1000 character limit on the comment section , i thought i could ask this seperately
Based on your answer , if i am using an unbounded query like "select column from images" , then it needs to go through ALL the tables like cassandra normal read path.and after that only the first 1000 (assuming my paging size is 1000) records is shown right?
but what i found is when i go to cqlsh and i do this query "select coulmn from images LIMIT 1000 " , it gave a timeout- its expected.
but in driver java if i do like the following (forgive if any syntax problems are there, and its just a partial code)
Statement statement = new SimpleStatement("SELECT column from images") statement.setFetchSize(1000); savingPageState = null; while(true) { if (null != savingPageState) { statement = statement.setPagingState(PagingState.fromString(savingPageState)); } result = session.execute(statement); PagingState pagingState = result.getExecutionInfo().getPagingState(); if (null != pagingState) { savingPageState = result.getExecutionInfo().getPagingState().toString(); } }
here right, i am executing the statement with next page size in a while loop and even if i am doing the unbounded query, i was able to fetch 1000 records at a time. so ideally if the same read path is followed , like scanning through all the tables, it should have timed out right?
could you clarify?