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

How we made DISTINCT queries up to 8000x faster on PostgreSQL

Blog post from Tiger Data

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

TimescaleDB 2.2.1 introduces a feature called "Skip Scan" that vastly improves query times for DISTINCT queries on PostgreSQL tables, hypertables, and distributed hypertables. This implementation of the technique achieves 26x-8000x faster queries in tests. With Skip Scan, developers can retrieve recent data quickly, reducing latency in applications that rely on time-series data. The feature works by incrementally searching for each successive item in an ordered index, making it much more efficient than scanning the entire index. TimescaleDB is a relational database for time-series data, and this implementation makes it even better by supporting PostgreSQL's extensible architecture. By upgrading to TimescaleDB 2.2.1, users can experience immediate speed improvements in many of their DISTINCT queries, especially those that retrieve recent data or handle large volumes of ordered data. The feature is available today for self-managed TimescaleDB and will be included in upcoming releases for managed services.

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.