Skip to content

Tag: offset

Query with offset returns overlapping data sets

Initial attempts at getting a very simple pagination, using fetch n rows and then a subsequent call with offset, gives overlapping entries in Oracle. I was expecting the following to give me two unique sets of results. 1-100 and then 101-200 of the results that would have been returned if the first line had b…

How to Select Records from large table batch wise in SQL

I have a table that contains billions of records. I want to select records in a batch using the c# while loop. I used Offset and Fetch Next, but it is taking too long to get results. If the table contains below 100k records, it works fine. What is the best way to batch select records? Sample Code Answer If