---
title: "Announcing chDB 4: write Pandas, run ClickHouse, now on Hex"
description: "chDB 4 introduces Data Store, a native component that allows users to write Pandas-like code that executes on the ClickHouse OLAP SQL engine. Standard Pandas workflows suffer from eager execution, excessive memory materialization, and lack of automatic query optimizations. To solve this, Data Store implements a four-layer architecture that lazily records operations as a chain of LazyOp objects and compiles them into optimized ClickHouse SQL plans upon evaluation triggers. When encountering operations unsupported by ClickHouse, the QueryPlanner splits the pipeline into segments, routing tasks between ClickHouse and Pandas while using Python's memoryview to minimize data copying overhead. This release also integrates natively into Hex notebooks."
---

# Announcing chDB 4: write Pandas, run ClickHouse, now on Hex

[Clickhouse](https://yomu.fyi/company/clickhouse) · Ryadh Dahimene, Auxten Wang · Mar 11, 2026

**Type:** Announcement

## Summary

chDB 4 introduces Data Store, a native component that allows users to write Pandas-like code that executes on the ClickHouse OLAP SQL engine. Standard Pandas workflows suffer from eager execution, excessive memory materialization, and lack of automatic query optimizations. To solve this, Data Store implements a four-layer architecture that lazily records operations as a chain of LazyOp objects and compiles them into optimized ClickHouse SQL plans upon evaluation triggers. When encountering operations unsupported by ClickHouse, the QueryPlanner splits the pipeline into segments, routing tasks between ClickHouse and Pandas while using Python's memoryview to minimize data copying overhead. This release also integrates natively into Hex notebooks.

## Context

Standard Pandas executes chained operations eagerly without global query visibility, materializing intermediate DataFrames in memory and inflating dataset sizes during processing, which causes workflows to break down in production data pipelines.

## Approach / What changed

chDB 4 adds Data Store, a four-layer lazy execution system that compiles Pandas-style pipelines into optimized ClickHouse SQL and splits operations unsupported by ClickHouse into separate segments routed via Python memoryview buffers.

## Takeaways

- Data Store records operations lazily and triggers execution only on operations like print(), len(), or .columns, compiling queries with filter pushdown, column pruning, and limit propagation.
- chDB avoids full data copies for numeric and fixed-width columns by exposing ClickHouse internal memory buffers directly to Pandas without serialization cycles.
- When a Pandas segment sits in the middle of a pipeline, downstream segments operate on intermediate in-memory data and cannot benefit from source-level optimizations like Parquet row-group skipping.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Data Pipelines](https://yomu.fyi/topic/data-pipelines), [Developer Experience](https://yomu.fyi/topic/developer-experience), [Performance](https://yomu.fyi/topic/performance), [Python](https://yomu.fyi/topic/python)

- Source: [Clickhouse](https://clickhouse.com/blog/chdb.4-0-pandas-hex)
- Source URL: https://clickhouse.com/blog/chdb.4-0-pandas-hex
- Ingested by Yomu: 2026-08-28T01:21:59.186Z

[Read original post](https://clickhouse.com/blog/chdb.4-0-pandas-hex)
