2025 Changelog

#### Performance Improvement[​](#performance-improvement "Direct link to Performance Improvement")

- Optimize `ORDER BY...LIMIT N` queries by using skip index and dynamic threshold filter to significantly reduce rows processed. [#89835](https://github.com/ClickHouse/ClickHouse/pull/89835) ([Shankar Iyer](https://github.com/shankar-iyer)).
- ClickHouse now uses skip indexes to perform index analysis on WHERE clauses with mixed `AND`- and `OR`-connected filter conditions. Previously, the WHERE clause needed to be a conjunction (AND) of filter conditions to utilize skip indexes. A new setting `use_skip_indexes_for_disjunctions` (default: on) controls this feature. (issue [#75228](https://github.com/ClickHouse/ClickHouse/issues/75228)). [#87781](https://github.com/ClickHouse/ClickHouse/pull/87781) ([Shankar Iyer](https://github.com/shankar-iyer)).
- Support keeping reading in order from the left table in LEFT/INNER JOIN operations, which can be utilized by subsequent steps. Can be disabled using setting `query_plan_read_in_order_through_join`. Support virtual row while reading optimization (see setting `read_in_order_use_virtual_row`) for LEFT/INNER JOINs. [#89815](https://github.com/ClickHouse/ClickHouse/pull/89815) ([Vladimir Cherkasov](https://github.com/vdimir)).
- Improve the performance of lazily materialized columns with a bigger limit. [#90309](https://github.com/ClickHouse/ClickHouse/pull/90309) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
- Users should see lower latency in index analysis when large `minmax` indexes (millions of granules) are present. [#90428](https://github.com/ClickHouse/ClickHouse/pull/90428) ([Shankar Iyer](https://github.com/shankar-iyer)).
- Implement simple DPsize join reordering algorithm for INNER JOINs. A new experimental setting controls what algorithms are used in which order, e.g. `query_plan_optimize_join_order_algorithm='dpsize,greedy'` means that DPsize is tried first with fallback to greedy. [#91002](https://github.com/ClickHouse/ClickHouse/pull/91002) ([Alexander Gololobov](https://github.com/davenger)).
- Fail fast when queries reach row limits. Resolves [#61872](https://github.com/ClickHouse/ClickHouse/issues/61872). [#62804](https://github.com/ClickHouse/ClickHouse/pull/62804) ([Sean Haynes](https://github.com/seandhaynes)).
- [#84477](https://github.com/clickhouse/clickhouse/pull/84477) added constrains regarding select queries which can be used in `insert select from s3Cluster(...)` queries for parallel distributed execution. this change allows using where, which was possible before. [#84611](https://github.com/ClickHouse/ClickHouse/pull/84611) ([Igor Nikonov](https://github.com/devcrafter)).
- Prefetch keys during hash table iteration to minimize cache misses. [#84708](https://github.com/ClickHouse/ClickHouse/pull/84708) ([lgbo](https://github.com/lgbo-ustc)).
- Optimize the `histogram` aggregate function by sorting only the tail of points array and skipping sort for monotonic inputs, achieving ~10% speedup. [#85760](https://github.com/ClickHouse/ClickHouse/pull/85760) ([MakarDev](https://github.com/MakarDev)).
- Improved filtering performance for predicates with functions such as `like`, `equals`, `has`, and others by leveraging an additional preliminary filter built from the text index. This optimization is enabled via the `query_plan_text_index_add_hint` setting. Improved usage of the text index for columns of `Map` data type. [#88550](https://github.com/ClickHouse/ClickHouse/pull/88550) ([Anton Popov](https://github.com/CurtizJ)).
- Optimize repeated inverse dictionary lookups by doing faster lookups into a precomputed set of possible key values. Closes [#7968](https://github.com/ClickHouse/ClickHouse/issues/7968). [#88971](https://github.com/ClickHouse/ClickHouse/pull/88971) ([Nihal Z. Miaji](https://github.com/nihalzp)).
- Improve `topK` aggregate function performance and behaviour. [#90091](https://github.com/ClickHouse/ClickHouse/pull/90091) ([Raúl Marín](https://github.com/Algunenano)).
- Improved performance of `Decimal` comparison operations. Resolves [#28192](https://github.com/ClickHouse/ClickHouse/issues/28192). [#90153](https://github.com/ClickHouse/ClickHouse/pull/90153) ([Konstantin Bogdanov](https://github.com/thevar1able)).
- Support partition pruning for Apache Paimon functions, continuing from <https://github.com/ClickHouse/ClickHouse/pull/84423>. [#90253](https://github.com/ClickHouse/ClickHouse/pull/90253) ([JIaQi](https://github.com/JiaQiTang98)).
- Use advanced SIMD operations for logical functions via dynamic dispatch. [#90432](https://github.com/ClickHouse/ClickHouse/pull/90432) ([Raúl Marín](https://github.com/Algunenano)).
- Improve JIT function performing by not initializing the result column to zero unnecessarily. [#90449](https://github.com/ClickHouse/ClickHouse/pull/90449) ([Raúl Marín](https://github.com/Algunenano)).
- Speed up `T64` decompression via dynamic dispatch. [#90610](https://github.com/ClickHouse/ClickHouse/pull/90610) ([Raúl Marín](https://github.com/Algunenano)).
- Optimize MergeTree reader inplace filtering. Resolves [#87119](https://github.com/ClickHouse/ClickHouse/issues/87119). [#90630](https://github.com/ClickHouse/ClickHouse/pull/90630) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
- Introduce an additional heuristic to reduce the widths of the selected merge choices. Performing more narrow merges will increase write amplification, but at the same time, can help prevent falling under the `TOO_MANY_PARTS` errors. [#91163](https://github.com/ClickHouse/ClickHouse/pull/91163) ([Mikhail Artemenko](https://github.com/Michicosun)).
- Improve query performance for S3 tables created with glob pattern by pushing down `_path` filter values, which allows to avoid S3 listing operations. Controlled by the `s3_path_filter_limit` setting. [#91165](https://github.com/ClickHouse/ClickHouse/pull/91165) ([Eduard Karacharov](https://github.com/korowa)).
- Speed up converting columns to bool (in WHERE clauses) via dynamic dispatch. [#91203](https://github.com/ClickHouse/ClickHouse/pull/91203) ([Raúl Marín](https://github.com/Algunenano)).
- Speed up sorting of single numeric block via dynamic dispatch. [#91213](https://github.com/ClickHouse/ClickHouse/pull/91213) ([Raúl Marín](https://github.com/Algunenano)).
- Add optimization to remove unused columns in query plans. Resolves [#75152](https://github.com/ClickHouse/ClickHouse/issues/75152). [#76487](https://github.com/ClickHouse/ClickHouse/pull/76487) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
- The default value of `query_plan_optimize_join_order_limit` is changed to `10`. [#89312](https://github.com/ClickHouse/ClickHouse/pull/89312) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Enable the setting `allow_statistics_optimize` by default, so the JOINs optimizer will use column statistics. [#89332](https://github.com/ClickHouse/ClickHouse/pull/89332) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Support JOIN runtime filters for `ANTI` JOINs. Also, refactor the runtime filters implementation to reduce lock contention. [#89710](https://github.com/ClickHouse/ClickHouse/pull/89710) ([Dmitry Novik](https://github.com/novikd)).
- Reduces memory usage during merges in `system.metric_log` table (enabled by default) by setting `min_bytes_for_wide_part` and `vertical_merge_algorithm_min_bytes_to_activate` to 128MB. [#89811](https://github.com/ClickHouse/ClickHouse/pull/89811) ([filimonov](https://github.com/filimonov)).
- Enable using inverted index in PREWHERE. Resolves [#89975](https://github.com/ClickHouse/ClickHouse/issues/89975). [#89977](https://github.com/ClickHouse/ClickHouse/pull/89977) ([Peng Jian](https://github.com/fastio)).
- Don't add S3 providers if GCP OAuth is used which improves performance on GCS. [#91706](https://github.com/ClickHouse/ClickHouse/pull/91706) ([Antonio Andelic](https://github.com/antonio2368)).

#### Improvement[​](#improvement "Direct link to Improvement")