diff --git a/ydb/core/kqp/executer_actor/kqp_data_executer.cpp b/ydb/core/kqp/executer_actor/kqp_data_executer.cpp index 2a4d9e7cfc42..4623c63756ee 100644 --- a/ydb/core/kqp/executer_actor/kqp_data_executer.cpp +++ b/ydb/core/kqp/executer_actor/kqp_data_executer.cpp @@ -2205,13 +2205,13 @@ class TKqpDataExecuter : public TKqpExecuterBasePlanExecution(); if (err) { diff --git a/ydb/core/kqp/executer_actor/kqp_planner.cpp b/ydb/core/kqp/executer_actor/kqp_planner.cpp index 407974c5866b..2aa6c6412727 100644 --- a/ydb/core/kqp/executer_actor/kqp_planner.cpp +++ b/ydb/core/kqp/executer_actor/kqp_planner.cpp @@ -64,7 +64,7 @@ TKqpPlanner::TKqpPlanner(TKqpTasksGraph& graph, ui64 txId, const TActorId& execu TVector&& resourcesSnapshot, const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig, bool useDataQueryPool, bool localComputeTasks, ui64 mkqlMemoryLimit, NYql::NDq::IDqAsyncIoFactory::TPtr asyncIoFactory, - bool doOptimization, const TIntrusivePtr& userRequestContext) + bool allowSinglePartitionOpt, const TIntrusivePtr& userRequestContext) : TxId(txId) , ExecuterId(executer) , Snapshot(snapshot) @@ -82,7 +82,7 @@ TKqpPlanner::TKqpPlanner(TKqpTasksGraph& graph, ui64 txId, const TActorId& execu , LocalComputeTasks(localComputeTasks) , MkqlMemoryLimit(mkqlMemoryLimit) , AsyncIoFactory(asyncIoFactory) - , DoOptimization(doOptimization) + , AllowSinglePartitionOpt(allowSinglePartitionOpt) , UserRequestContext(userRequestContext) { if (!Database) { @@ -410,7 +410,7 @@ std::unique_ptr TKqpPlanner::PlanExecution() { ComputeTasks.clear(); } - if (nComputeTasks == 0 && TasksPerNode.size() == 1 && (AsyncIoFactory != nullptr) && DoOptimization && LocalComputeTasks) { + if (nComputeTasks == 0 && TasksPerNode.size() == 1 && (AsyncIoFactory != nullptr) && AllowSinglePartitionOpt) { // query affects a single key or shard, so it might be more effective // to execute this task locally so we can avoid useless overhead for remote task launching. for (auto& [shardId, tasks]: TasksPerNode) { diff --git a/ydb/core/kqp/executer_actor/kqp_planner.h b/ydb/core/kqp/executer_actor/kqp_planner.h index 45825d1d65db..3d0f7f7fa9f5 100644 --- a/ydb/core/kqp/executer_actor/kqp_planner.h +++ b/ydb/core/kqp/executer_actor/kqp_planner.h @@ -46,7 +46,7 @@ class TKqpPlanner { const Ydb::Table::QueryStatsCollection::Mode& statsMode, bool withSpilling, const TMaybe& rlPath, NWilson::TSpan& ExecuterSpan, TVector&& resourcesSnapshot, const NKikimrConfig::TTableServiceConfig::TExecuterRetriesConfig& executerRetriesConfig, - bool useDataQueryPool, bool localComputeTasks, ui64 mkqlMemoryLimit, NYql::NDq::IDqAsyncIoFactory::TPtr asyncIoFactory, bool doOptimization, + bool useDataQueryPool, bool localComputeTasks, ui64 mkqlMemoryLimit, NYql::NDq::IDqAsyncIoFactory::TPtr asyncIoFactory, bool allowSinglePartitionOpt, const TIntrusivePtr& userRequestContext); bool SendStartKqpTasksRequest(ui32 requestId, const TActorId& target); @@ -100,7 +100,7 @@ class TKqpPlanner { NYql::NDq::IDqAsyncIoFactory::TPtr AsyncIoFactory; ui32 nComputeTasks = 0; ui32 nScanTasks = 0; - bool DoOptimization; + bool AllowSinglePartitionOpt; THashMap PendingComputeActors; // Running compute actors (pure and DS) THashSet PendingComputeTasks; // Not started yet, waiting resources