v25.12 Changelog for Cloud

## Performance Improvements[​](#performance-improvements "Direct link to Performance Improvements")

### Query execution and optimization[​](#query-execution-and-optimization "Direct link to Query execution and optimization")

- 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)).
- 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)).
- Optimization for large value in ConstantNode. Closes [#72880](https://github.com/ClickHouse/ClickHouse/issues/72880). [#81104](https://github.com/ClickHouse/ClickHouse/pull/81104) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
- Prefetch keys during hash table iteration to minimize cache misses. [#84708](https://github.com/ClickHouse/ClickHouse/pull/84708) ([lgbo](https://github.com/lgbo-ustc)).
- Improve LZ4 decompression speed by simplifying the code and tweaking the selection algorithm. [#88360](https://github.com/ClickHouse/ClickHouse/pull/88360) ([Raúl Marín](https://github.com/Algunenano)).
- Implement lazy columns replication in JOIN and ARRAY JOIN. Avoid converting special columns representation like Sparse and Replicated to full columns in some output formats. This avoids unnecessary data copy in memory. [#88752](https://github.com/ClickHouse/ClickHouse/pull/88752) ([Pavel Kruglov](https://github.com/Avogar)).
- 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)).
- 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)).

### JOIN optimizations[​](#join-optimizations "Direct link to JOIN optimizations")

- `RIGHT` and `FULL JOIN`s now use ConcurrentHashJoi`n; that means that these types of join are now running with a higher degree of parallelism. Improves various cases for RIGHT and FULL JOINs up to 2 times. Resolves [#78027](https://github.com/ClickHouse/ClickHouse/issues/78027). [#78462](https://github.com/ClickHouse/ClickHouse/pull/78462) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
- Allow rewriting `ANY LEFT JOIN` or `ANY RIGHT JOIN` to `ALL INNER JOIN` in some cases. [#89403](https://github.com/ClickHouse/ClickHouse/pull/89403) ([Dmitry Novik](https://github.com/novikd)).
- 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)).
- Support keeping reading in order from the left table in `LEFT`/`INNER JOIN` operations, which can be utilized by subsequent steps. [#89815](https://github.com/ClickHouse/ClickHouse/pull/89815) ([Vladimir Cherkasov](https://github.com/vdimir)).

### MergeTree and storage optimizations[​](#mergetree-and-storage-optimizations "Direct link to MergeTree and storage optimizations")

- Up to 8x faster `SELECT` queries with heavy partition pruning on tables with 10K+ parts. [#85535](https://github.com/ClickHouse/ClickHouse/pull/85535) ([James Morrison](https://github.com/jawm)).
- When a query uses fixed hash map for aggregation state(group by a small integer), ClickHouse would merge the aggregation state in parallel to speed up the query. Resolves [#63666](https://github.com/ClickHouse/ClickHouse/issues/63666). [#87366](https://github.com/ClickHouse/ClickHouse/pull/87366) ([Jianfei Hu](https://github.com/incfly)).
- Parquet reader v3 is enabled by default. [#88827](https://github.com/ClickHouse/ClickHouse/pull/88827) ([Michael Kolupaev](https://github.com/al13n321)).
- Queries can now benefit from optimize\_read\_in\_order and query\_plan\_optimize\_lazy\_materialization simultaneously. Resolves [#88767](https://github.com/ClickHouse/ClickHouse/issues/88767). [#88866](https://github.com/ClickHouse/ClickHouse/pull/88866) ([Manuel](https://github.com/raimannma)).
- Use aggregate projection for queries with `DISTINCT`. Closes [#86925](https://github.com/ClickHouse/ClickHouse/issues/86925). [#88894](https://github.com/ClickHouse/ClickHouse/pull/88894) ([Nihal Z. Miaji](https://github.com/nihalzp)).
- Run streaming `LIMIT BY` transform in cases when input sort order matches LIMIT BY keys. [#88969](https://github.com/ClickHouse/ClickHouse/pull/88969) ([Eduard Karacharov](https://github.com/korowa)).
- Added support of sparse serialization for columns of Nullable type. [#88999](https://github.com/ClickHouse/ClickHouse/pull/88999) ([Amos Bird](https://github.com/amosbird)).
- 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. [#91163](https://github.com/ClickHouse/ClickHouse/pull/91163) ([Mikhail Artemenko](https://github.com/Michicosun)).

### Index and text search optimizations[​](#index-and-text-search-optimizations "Direct link to Index and text search optimizations")

- 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. [#87781](https://github.com/ClickHouse/ClickHouse/pull/87781) ([Shankar Iyer](https://github.com/shankar-iyer)).
- 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. [#88550](https://github.com/ClickHouse/ClickHouse/pull/88550) ([Anton Popov](https://github.com/CurtizJ)).
- Improved text index performance by caching dictionary blocks and using hashtables for token lookups instead of binary search. [#88786](https://github.com/ClickHouse/ClickHouse/pull/88786) ([Elmi Ahmadov](https://github.com/ahmadov)).
- Since posting lists are the largest by the data size, caching them would improve the performance in consecutive runs. [#88912](https://github.com/ClickHouse/ClickHouse/pull/88912) ([Elmi Ahmadov](https://github.com/ahmadov)).
- 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)).
- 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)).
- 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)).