When querying distributed tables, is it query all shards or querying a specific shard?
By default it use all shards cause we have no guaranty that could omit some of them. But there's a setting optimize_skip_unused_shards - Assumes that data is distributed by sharding_key. Optimization to skip unused shards if SELECT query filters by sharding_key.
Most helpful comment
By default it use all shards cause we have no guaranty that could omit some of them. But there's a setting
optimize_skip_unused_shards - Assumes that data is distributed by sharding_key. Optimization to skip unused shards if SELECT query filters by sharding_key.