Inconsistent result sets during paginated fetches without deterministic ordering
0 reputation · 22 Mar 2024, 21:12 UTC
DBeaver utilizes a configured fetch size to limit the number of rows loaded into the JVM from the database cursor. When navigating large datasets using the 'Fetch next page' mechanism, the application requests subsequent blocks of rows based on the initial query execution.
A conflict arises when the underlying table lacks a deterministic primary key or a unique ORDER BY clause. In these scenarios, if the database state is modified externally between page requests, the database engine may return duplicate rows or skip records entirely during the next fetch because the physical row order is not guaranteed.
Since the results grid caches fetched pages locally until a manual refresh is triggered, it is unclear how DBeaver maintains data integrity across the full result set for non-deterministic queries.
- How does DBeaver guarantee row consistency across paginated fetches when the query lacks a unique sort?
- Is there a configuration to force a server-side snapshot for the entire result set to prevent drift?