mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Do not perform optimize_skip_unused_shards for cluster with one node
This commit is contained in:
parent
fafe8c00fe
commit
a497d4d462
@ -468,7 +468,7 @@ QueryProcessingStage::Enum StorageDistributed::getQueryProcessingStage(
|
||||
|
||||
/// Always calculate optimized cluster here, to avoid conditions during read()
|
||||
/// (Anyway it will be calculated in the read())
|
||||
if (settings.optimize_skip_unused_shards)
|
||||
if (getClusterQueriedNodes(settings, cluster) > 1 && settings.optimize_skip_unused_shards)
|
||||
{
|
||||
ClusterPtr optimized_cluster = getOptimizedCluster(local_context, metadata_snapshot, query_info.query);
|
||||
if (optimized_cluster)
|
||||
|
@ -0,0 +1,3 @@
|
||||
-- remote() does not have sharding key, while force_optimize_skip_unused_shards=2 requires from table to have it.
|
||||
-- But due to only one node, everything works.
|
||||
select * from remote('127.1', system.one) settings optimize_skip_unused_shards=1, force_optimize_skip_unused_shards=2 format Null;
|
Loading…
Reference in New Issue
Block a user