---
title: "ClickHouse Release 24.6"
description: "ClickHouse 24.6 adds an optimize_row_order setting for plain MergeTree tables."
url: "https://swe.quest/articles/clickhouse-release-24-6-003c18b45227c882"
canonical: "https://clickhouse.com/blog/clickhouse-release-24-06"
source: "ClickHouse"
published: "2024-07-11"
difficulty: "medium"
kind: "Release"
reading_minutes: 15
tags: ["analytics","storage-engines","python","performance"]
---

# ClickHouse Release 24.6

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2024-07-11, 15 min read, Release. Original: [https://clickhouse.com/blog/clickhouse-release-24-06](https://clickhouse.com/blog/clickhouse-release-24-06)

## Summary

ClickHouse 24.6 adds an optimize\_row\_order setting for plain MergeTree tables. Within each range of identical ORDER BY values, it sorts rows by the remaining columns in ascending cardinality, creating long runs that LZ4 and ZSTD compress better. Loading 1 billion PyPI download rows shows about 30% better compression (25.36 GiB down to 17.52 GiB), at the cost of 30-50% slower inserts. It helps only with no or low-cardinality sort keys. The release also brings chDB 2.0, which queries Pandas DataFrames, Arrow tables and Python dicts in-process, plus Hilbert curve encoding functions that complement Morton encoding for locality-preserving multi-column sort keys.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- ClickHouse MergeTree tables ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- columnar compression basics

## Keywords

ClickHouse, MergeTree, chDB, Hilbert curve, Morton encoding, optimize\_row\_order, Pandas, Apache Arrow

## Related posts

- [ClickHouse Release 24.12](https://swe.quest/articles/clickhouse-release-24-12-a4df30e6ccdd0296.md): ClickHouse · 2025-01-09 · Medium · 15 min read · Analytics & OLAP, Query engines, Performance engineering, SQL
  ClickHouse 24.12 adds LIKE and unknown-value equality/IN support for Enums, an experimental descending MergeTree sorting key, JSON subcolumns as primary key columns, Iceberg REST catalog (Unity, Polaris) and schema evolution support, and automatic JOIN side swapping via query\_plan\_join\_swap\_table.
- [Top 10 best practices tips for ClickHouse](https://swe.quest/articles/top-10-best-practices-tips-for-clickhouse-4df5699bf7bd75dd.md): ClickHouse · 2026-03-26 · Medium · 21 min read · Analytics & OLAP, Performance engineering, Databases, SQL
  Ten practices for getting performance and storage efficiency out of ClickHouse, each measured on a 150M-row Amazon reviews dataset.
- [Super charging your ClickHouse queries](https://swe.quest/articles/super-charging-your-clickhouse-queries-55ad4f3a6c2fa875.md): ClickHouse · 2022-12-15 · Medium · 15 min read · Analytics & OLAP, Performance engineering, Query engines, SQL
  ClickHouse query speed comes mainly from reading less data: a sparse primary index stores one entry per 8192-row granule and lets binary search skip blocks that can't match the WHERE clause.
- [How we built fast UPDATEs for the ClickHouse column store – Part 1: Purpose-built engines](https://swe.quest/articles/how-we-built-fast-updates-for-the-clickhouse-column-store-part-1-purpose-built-477e921f016259fa.md): ClickHouse · 2025-07-22 · Medium · 12 min read · Analytics & OLAP, Storage engines, Databases
  ClickHouse avoids slow in-place row updates in its column store by expressing updates and deletes as inserts that get resolved during the background merges MergeTree already performs.
- [Optimizing ClickHouse with Schemas and Codecs](https://swe.quest/articles/optimizing-clickhouse-with-schemas-and-codecs-795411feff5942b1.md): ClickHouse · 2022-12-14 · Medium · 23 min read · Analytics & OLAP, Storage engines, Performance engineering, SQL
  Tightening a ClickHouse schema with strict types cuts a 1B-row NOAA weather dataset from 131.58 GiB to 71.38 GiB uncompressed.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
