Company
Date Published
Author
Tom Schreiber
Word count
2596
Language
English
Hacker News points
None

Summary

The query condition cache is a new feature in ClickHouse that improves performance by caching information about which parts of the data matched (or didn't match) a given filter. This allows ClickHouse to skip large portions of data during repeated query execution, even if the overall query shape changes. The cache operates at the granule level and can be used with selective filters to significantly speed up queries. By reusing the same predicate across multiple queries, users can benefit from the query condition cache without having to manually manage it. The feature is memory-efficient and can store a large number of granule entries, making it suitable for repeated queries with selective filters. With the query condition cache enabled, ClickHouse can achieve faster performance and reduced memory usage compared to running the same query without caching.