Hi All,
We have queries that we are running (fairly basic select statements), but are using LIMIT/OFFSET since the volumes we’re retrieving are too large to hold in memory for processing. Something we’ve noticed, is that our data is getting duplicated in some cases, and missing in other cases after retrieving data using LIMIT/OFFSET. Do we need to use an ORDER BY clause in order to get consistent results when using LIMIT/OFFSET?
We’re not sure this is the cause, but it seems likely - wondering if the query is using different indexes, perhaps an index we intend and then an intersection when we query a second time…which we thought might cause a different sort order, which would explain the missed/duplicated data while using LIMIT/OFFSET.
Any thoughts?