---
title: "Introducing multi-stage distributed query execution in ClickHouse Cloud"
description: "ClickHouse Cloud adds multi-stage distributed query execution, splitting a query plan into stages connected by exchange operators (Gather, Shuffle, Broadcast, Scatter) so intermediate data can be repartitioned between nodes mid-query."
url: "https://swe.quest/articles/introducing-multi-stage-distributed-query-execution-in-clickhouse-cloud-49bf049f23a569d6"
canonical: "https://clickhouse.com/blog/multi-stage-distributed-query-execution-clickhouse-cloud"
source: "ClickHouse"
published: "2026-05-27"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 14
tags: ["query-engines","distributed-databases","analytics","performance"]
---

# Introducing multi-stage distributed query execution in ClickHouse Cloud

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-05-27, 14 min read, Deep dive. Original: [https://clickhouse.com/blog/multi-stage-distributed-query-execution-clickhouse-cloud](https://clickhouse.com/blog/multi-stage-distributed-query-execution-clickhouse-cloud)

## Summary

ClickHouse Cloud adds multi-stage distributed query execution, splitting a query plan into stages connected by exchange operators (Gather, Shuffle, Broadcast, Scatter) so intermediate data can be repartitioned between nodes mid-query. Shuffling by join key means each worker builds only its share of the hash table instead of the full right side, and shuffling by GROUP BY key removes the single-coordinator final merge for high-cardinality aggregations. Exchanges stream blocks between workers over TCP by default, with a persisted mode writing to object storage for spilling and future fault recovery. Early TPC-H results show up to 3.4× speedups on join-heavy queries and 7.4× faster aggregation on 8 nodes versus 1.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Query engines](https://swe.quest/tags/query-engines.md) (Data & databases)
- [Distributed databases](https://swe.quest/tags/distributed-databases.md) (Data & databases)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- hash join basics
- query plans and EXPLAIN
- distributed/sharded databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- ClickHouse architecture ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))

## Keywords

ClickHouse Cloud, exchange operator, ShuffleExchange, parallel replicas, TPC-H, Volcano, Distributed table engine

## Related posts

- [How we scaled raw GROUP BY to 100 B+ rows in under a second](https://swe.quest/articles/how-we-scaled-raw-group-by-to-100-b-rows-in-under-a-second-c36aee54a6541514.md): ClickHouse · 2025-09-29 · Medium · 23 min read · Query engines, Analytics & OLAP, Performance engineering, Distributed databases, Scaling
  ClickHouse Cloud's parallel replicas feature spreads a single GROUP BY query across every core of every node in a service, with no pre-aggregation or data reshuffling.
- [How ClickHouse became fast at joins](https://swe.quest/articles/how-clickhouse-became-fast-at-joins-68de042e0ff6c22e.md): ClickHouse · 2026-06-03 · Hard · 15 min read · Query engines, Analytics & OLAP, Performance engineering, SQL
  ClickHouse became 26× faster on the join-heavy TPC-H SF100 workload between 22.4 and 26.4.
- [ClickHouse Release 25.9](https://swe.quest/articles/clickhouse-release-25-9-512577de2ea7d4de.md): ClickHouse · 2025-10-02 · Medium · 10 min read · Query engines, Analytics & OLAP, Performance engineering, Search, SQL
  ClickHouse 25.9 adds automatic global join reordering, which uses a greedy algorithm plus row-count estimates or manually created column statistics to pick build/probe order across many tables.
- [ClickHouse vs. Elasticsearch: The Mechanics of Count Aggregations](https://swe.quest/articles/clickhouse-vs-elasticsearch-the-mechanics-of-count-aggregations-fa943a94e2c565e4.md): ClickHouse · 2024-05-07 · Medium · 15 min read · Query engines, Analytics & OLAP, Search, Performance engineering
  ClickHouse runs count(\*) GROUP BY aggregations in parallel at three levels: SIMD within column values, multiple cores over arbitrary data ranges, and multiple nodes over shards.
- [Agentic analytics starts with query-ready data: the write-side cost of Snowflake vs. ClickHouse](https://swe.quest/articles/agentic-analytics-starts-with-query-ready-data-the-write-side-cost-of-snowflake-e188e777c7d23ef1.md): ClickHouse · 2026-05-06 · Medium · 23 min read · Analytics & OLAP, Storage engines, Cost optimization, Performance engineering
  Under continuous ingest, keeping data sorted for chunk-level pruning is a write-side cost that standard query benchmarks ignore.

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)
