DEV Community

Cover image for Day 95/100 – ClickHouse® 26.3 S3 Object Storage Read Enhancements: Faster Data Lake Queries
Kanishga Subramani
Kanishga Subramani

Posted on

Day 95/100 – ClickHouse® 26.3 S3 Object Storage Read Enhancements: Faster Data Lake Queries

Introduction

Cloud object storage has become the foundation of modern data lake architectures. Services such as Amazon S3 and S3-compatible object stores provide virtually unlimited, cost-effective storage for massive analytical datasets, making them the preferred choice for storing historical logs, clickstream data, IoT events, machine learning datasets, and business intelligence workloads.

Rather than copying every dataset into local storage, many organizations now query data directly from object storage using formats such as Parquet, Iceberg, Delta Lake, and Apache Hudi. This approach reduces storage costs, simplifies data sharing, and enables multiple analytics engines to work on the same data lake.

ClickHouse® has long supported querying data directly from S3 using table functions and native storage engines. However, network latency and object storage access overhead have traditionally made remote reads slower than querying local MergeTree tables.

ClickHouse® 26.3 significantly improves this experience with major enhancements to the S3 object storage read path. The release introduces faster parallel reads, smarter metadata caching, asynchronous Iceberg metadata prefetching, more efficient S3Queue ingestion, and reduced memory usage for semi-structured data.

The result is dramatically faster queries against object storage without requiring schema changes, query rewrites, or application modifications.

In this article, we'll explore these improvements and understand how they benefit modern lakehouse architectures.


Why Object Storage Matters

Today's analytical workloads increasingly separate storage from compute.

Instead of keeping all datasets on local disks, organizations store data in cloud object storage while scaling compute independently.

Common use cases include:

  • Data lakes
  • Data lakehouses
  • Historical event storage
  • Log analytics
  • Clickstream analysis
  • Machine learning datasets
  • Business intelligence platforms

Popular table formats include:

  • Apache Parquet
  • Apache Iceberg
  • Delta Lake
  • Apache Hudi

ClickHouse can query these formats directly without first importing data into MergeTree tables.


The Challenge Before ClickHouse® 26.3

Although object storage offers excellent scalability and lower storage costs, remote reads naturally introduce additional overhead.

Each query may require:

  • Opening remote objects
  • Reading metadata
  • Fetching Parquet footers
  • Downloading row groups
  • Waiting on network latency

For workloads scanning only a handful of large files, CPUs frequently became underutilized while waiting for remote I/O.

As a result, applications experienced higher query latency compared to local storage.


Faster Parallel Reads

The most significant improvement in ClickHouse® 26.3 is a redesigned object storage read path.

Instead of waiting for individual remote read operations to complete sequentially, ClickHouse now parallelizes object storage reads across multiple CPU cores.

This improvement benefits:

  • Amazon S3
  • S3-compatible storage
  • Apache Iceberg
  • Delta Lake
  • Apache Hudi
  • Parquet files
  • CSV files queried through the s3() table function

The biggest performance gains occur when:

  • Queries read a relatively small number of files
  • Files are large
  • Multiple CPU cores are available

Instead of leaving CPU cores idle while waiting on network operations, ClickHouse keeps multiple cores busy simultaneously.

According to the ClickHouse® 26.3 release notes, these optimizations can make object storage reads tens of times faster on multi-core systems for suitable workloads.


Smarter Parquet Metadata Caching

Every Parquet file contains metadata stored in its footer.

Before processing data, ClickHouse reads this footer to understand:

  • Schema
  • Row groups
  • Column statistics
  • File layout

Repeatedly downloading this metadata for frequently queried files adds unnecessary latency.

ClickHouse® 26.3 introduces a new SLRU (Segmented Least Recently Used) cache for Parquet metadata.

Benefits include:

  • Enabled by default
  • Up to 2× fewer metadata reads
  • Faster repeated queries
  • Reduced network requests

To ensure correctness, cached metadata is validated using each file's ETag, preventing stale metadata from being used.


Faster Iceberg Metadata Access

Iceberg users receive another major optimization.

Traditionally, each query needed to communicate with the Iceberg catalog before execution.

Although necessary for consistency, repeated catalog lookups increase query latency.

ClickHouse® 26.3 introduces asynchronous metadata prefetching.

Instead of retrieving metadata during every query, ClickHouse periodically refreshes metadata in the background.

Example:

CREATE TABLE my_iceberg (...)
ENGINE = IcebergS3(...)
SETTINGS
iceberg_metadata_async_prefetch_period_ms = 60000;
Enter fullscreen mode Exit fullscreen mode

Queries can specify acceptable metadata freshness.

SELECT *
FROM my_iceberg
SETTINGS
iceberg_metadata_staleness_ms = 30000;
Enter fullscreen mode Exit fullscreen mode

If cached metadata is sufficiently recent, ClickHouse avoids contacting the Iceberg catalog entirely during query execution.

This removes catalog communication from the critical query path.


Better S3Queue Performance

S3Queue continuously monitors object storage for newly uploaded files.

Before ClickHouse® 26.3, queues frequently scanned the complete object prefix history to identify new files.

For buckets containing millions of historical objects, repeated listing operations became increasingly expensive.

ClickHouse® 26.3 improves ordered-mode S3Queue by using the StartAfter parameter.

Benefits include:

  • Avoids scanning entire bucket history
  • Reduces ListObjects API requests
  • Faster detection of new files
  • Lower cloud API costs

This is particularly valuable for long-running ingestion pipelines.


Lower Memory Usage for JSON Data

Many organizations store event data as JSON inside object storage.

Queries often read only a small subset of JSON attributes.

Earlier versions sometimes overestimated memory requirements for these partial reads.

ClickHouse® 26.3 introduces more accurate memory estimation for JSON subcolumns.

Benefits include:

  • Up to 8× lower memory usage
  • Better resource utilization
  • Improved query stability
  • More efficient semi-structured analytics

This enhancement is especially useful for:

  • Event logs
  • Clickstream data
  • Application telemetry
  • Observability platforms

What This Means for Your Architecture

One of the best aspects of these improvements is that they require virtually no application changes.

If you're already using:

  • s3() table functions
  • IcebergS3
  • DeltaLakeS3
  • Hudi
  • S3Queue

most improvements become available simply by upgrading to ClickHouse® 26.3.

Organizations benefit from:

  • Lower query latency
  • Reduced network overhead
  • Fewer API calls
  • Better CPU utilization
  • Improved scalability

without changing existing SQL queries.


Getting Started

Most improvements are enabled automatically.

For the best results, consider the following recommendations.

Verify Parquet Metadata Caching

Ensure metadata caching remains enabled for frequently queried datasets.

use_parquet_metadata_cache = 1
Enter fullscreen mode Exit fullscreen mode

Configure Iceberg Metadata Prefetch

For busy Iceberg tables:

iceberg_metadata_async_prefetch_period_ms = 60000
Enter fullscreen mode Exit fullscreen mode

Enable Ordered S3Queue

Long-running ingestion pipelines benefit from ordered mode together with the StartAfter optimization.


Best Practices

To maximize performance:

  • Store analytical data using Parquet whenever possible.
  • Partition data appropriately to minimize unnecessary scans.
  • Enable metadata caching for repeated queries.
  • Configure asynchronous Iceberg metadata refresh on heavily queried tables.
  • Use ordered-mode S3Queue for continuous ingestion.
  • Monitor object storage latency alongside ClickHouse performance metrics.
  • Keep ClickHouse updated to benefit from ongoing object storage optimizations.

Final Thoughts

Object storage has become the backbone of modern analytics, offering scalable and cost-effective storage for massive datasets. However, remote reads have traditionally introduced a performance gap compared to querying locally stored data.

ClickHouse® 26.3 significantly narrows that gap by redesigning the object storage read path, improving parallelism, introducing intelligent Parquet metadata caching, optimizing Iceberg metadata access, enhancing S3Queue ingestion, and reducing memory consumption for JSON workloads.

For organizations building lakehouse architectures on Amazon S3 or compatible object storage, these enhancements translate into faster queries, lower API costs, better resource utilization, and improved scalability—all without changing schemas, rewriting SQL, or redesigning ingestion pipelines.

As more organizations adopt cloud-native analytics, these S3 improvements make ClickHouse an even stronger choice for high-performance querying directly against data lakes.


References

  • ClickHouse® 26.3 Release Notes
  • ClickHouse® 26.3 Announcement
  • ClickHouse® Documentation – S3 Table Function
  • ClickHouse® Documentation – Iceberg Table Engine
  • ClickHouse® Documentation – S3Queue

Top comments (0)