Home / Companies / Tiger Data / Blog / Post Details
Content Deep Dive

14,000x Faster Planning for LIMIT Queries on Hypertables

Blog post from Tiger Data

Post Details
Company
Date Published
Author
Sven Klemm
Word Count
1,605
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

TimescaleDB introduces DeferredChunkAppend in version 2.30 to address slow planning for common hypertable queries such as retrieving the latest device metric with ORDER BY time DESC LIMIT 1. Previously, queries without a time-dimension constraint required TimescaleDB to expand and plan scans for every chunk, causing planning and executor startup costs to grow linearly with chunk count even though ChunkAppend could stop scanning after finding enough rows. DeferredChunkAppend leaves the hypertable unexpanded during planning and lazily opens chunks during execution in the required order, allowing a LIMIT to stop work after only the necessary chunks are visited. It supports direct LIMIT queries on a single hypertable, with limited ordering and filtering conditions, while more complex queries involving joins, aggregates, dimension constraints, row-level security, or certain partitioning schemes retain the existing append-based plans. Benchmarks show planning remains roughly constant at about 0.014 milliseconds with DeferredChunkAppend across up to 10,000 chunks, compared with hundreds of milliseconds or several seconds for expanded plans, and the feature is enabled by default.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.