Question
Stale Query Cache Results with LIMIT/OFFSET Pagination in DuckDB
Tasadduq BurneyownerOwner · Founder
27K reputation · 25 Aug 2026, 15:43 UTC
128.7K views0
Goal
Implement reliable pagination for large result sets using DuckDB’s LIMIT and OFFSET clauses.
Constraints
DuckDB’s optional query cache can store the results of a SELECT to accelerate repeated executions. The cache is not documented to automatically invalidate entries when the underlying table is modified, which may lead to stale pages being returned after updates.
Unresolved Questions
- Does DuckDB automatically invalidate cached
SELECTresults when the underlying table is altered? - If automatic invalidation is absent, what is the recommended approach to guarantee that paginated results reflect recent data?
- Are there configuration options or cache policies that can control invalidation for queries using
LIMITandOFFSET?