v.22.6Improvement

Local and Remote Replica Coordination in Shard Plans

Now if a shard has local replica we create a local plan and a plan to read from all remote replicas. They have shared initiator which coordinates reading. #37204 (Nikita Mikhaylov).
ClickHouse now optimizes reading from replicated shards by creating a local plan for local replicas and a separate plan to read from all remote replicas, coordinated by a shared initiator.

Why it matters

This feature improves query execution efficiency and reliability in distributed replicated environments by coordinating reads between local and remote replicas, reducing redundant work and enhancing data retrieval performance.

How to use it

This behavior is automatic when querying replicated tables over shards with local and remote replicas. Users do not need to enable any settings; the query planner will create coordinated plans for local and remote replica reads.