ClickHouse Release 25.9

The ClickHouse Team
11 min readintermediate
--
View Original

Overview

ClickHouse Release 25.9 introduces significant enhancements, including 25 new features, 22 performance optimizations, and 83 bug fixes. Key improvements include automatic global join reordering, streaming for secondary indices, and a new text index, aimed at optimizing query performance and enhancing user experience.

What You'll Learn

1

How to implement automatic global join reordering in ClickHouse

2

Why streaming for secondary indices improves query performance

3

How to utilize the new text index for efficient full-text search

Prerequisites & Requirements

  • Understanding of SQL and database indexing concepts

Key Questions Answered

What are the benefits of automatic global join reordering in ClickHouse?
Automatic global join reordering optimizes the execution of complex queries by determining the best order to join multiple tables, significantly reducing runtime. This feature is crucial as the efficiency of join operations can vary greatly based on the order of joins, potentially improving performance by orders of magnitude.
How does streaming for secondary indices enhance query performance?
Streaming for secondary indices allows ClickHouse to interleave data reads with index checks, eliminating unnecessary scans of data granules. This concurrent execution can lead to performance improvements, such as making a query with a LIMIT clause over 4× faster compared to previous versions.
What is the new text index feature in ClickHouse 25.9?
The new text index feature in ClickHouse 25.9 is designed for efficient full-text search. It structures data around skip index granules, making it streaming-friendly and improving query performance significantly compared to previous implementations that required loading large data chunks into memory.

Key Statistics & Figures

Performance improvement with global join reordering
1,450× faster
This was observed in TPC-H benchmark queries when comparing execution times with and without column statistics.
Memory usage reduction
25× less memory usage
This reduction was noted when executing queries with statistics enabled compared to those without.
Speed improvement for LIMIT 1 query
over 4× faster
This was achieved with streaming indices enabled on a 1 billion row table.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Database
Clickhouse
Used for data storage and processing with enhanced features in version 25.9.
Storage
AWS S3
Used for specifying storage classes in ClickHouse when utilizing the S3 table engine.

Key Actionable Insights

1
Utilize automatic global join reordering to enhance query performance in complex datasets.
By leveraging this feature, you can optimize your SQL queries, especially when dealing with multiple tables, resulting in faster execution times and reduced resource consumption.
2
Implement streaming for secondary indices to improve the efficiency of your queries.
This approach allows ClickHouse to skip unnecessary data reads, making it particularly beneficial for queries with LIMIT clauses, thus saving time and computational resources.
3
Adopt the new text index for full-text search capabilities in your applications.
This index allows for faster searches and better performance, especially when querying large datasets, making it a valuable addition for applications requiring efficient text retrieval.

Common Pitfalls

1
Failing to create column statistics can lead to suboptimal query performance.
Without proper statistics, ClickHouse cannot optimize join orders effectively, which can result in significantly longer execution times.

Related Concepts

Database Indexing
Query Optimization Techniques
Full-text Search Methods