# How ClickHouse makes Top-N queries faster with granule-level data skipping

DevFeed: [How ClickHouse makes Top-N queries faster with granule-level data skipping](<https://devfeed.tech/articles/how-clickhouse-makes-top-n-queries-faster-with-granule-level-data-skipping-5155.md>)

Original publisher: [Read original article](<https://clickhouse.com/blog/clickhouse-top-n-queries-granule-level-data-skipping>)

Author: Tom Schreiber

Published: 2026-01-19T10:29:01Z

Content type: article

Language: en

Sources: [ClickHouse Blog](<https://devfeed.tech/sources/clickhouse-blog.md>)

Topics: [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>), [IO](<https://devfeed.tech/topics/io.md>), [dashboards](<https://devfeed.tech/topics/dashboards.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [dashboards](<https://devfeed.tech/tags/dashboards.md>), [data](<https://devfeed.tech/tags/data.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [scale](<https://devfeed.tech/tags/scale.md>), [sorting](<https://devfeed.tech/tags/sorting.md>)

## AI overview

ClickHouse accelerates Top-N queries by using min/max metadata from data-skipping indexes to prune entire granules before reading them. Combined with streaming execution, ordered reads, and lazy column loading, this approach can reduce data read and improve query speed, especially for large tables and cold caches.

## Source excerpt

A deep dive into how ClickHouse uses data-skipping metadata to turn Top-N queries into a pruning problem, cutting I/O and speeding up queries at scale.