diff options
author | ssmike <ssmike@ydb.tech> | 2023-08-16 18:25:34 +0300 |
---|---|---|
committer | ssmike <ssmike@ydb.tech> | 2023-08-16 20:19:04 +0300 |
commit | a5f07dbb2c2d83106f82c3eb29d1dd4dabaeaabb (patch) | |
tree | 8900e42e5a7f60691d2598d7e617beb3aed9b071 | |
parent | 522e99b6a3c17591c4fa6db05c3dd134e5cecd99 (diff) | |
download | ydb-a5f07dbb2c2d83106f82c3eb29d1dd4dabaeaabb.tar.gz |
Enable sequential reads by default
-rw-r--r-- | ydb/core/kqp/executer_actor/kqp_executer_impl.h | 5 | ||||
-rw-r--r-- | ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp | 2 | ||||
-rw-r--r-- | ydb/core/protos/config.proto | 2 | ||||
-rw-r--r-- | ydb/core/sys_view/ut_kqp.cpp | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/ydb/core/kqp/executer_actor/kqp_executer_impl.h b/ydb/core/kqp/executer_actor/kqp_executer_impl.h index be19b632a9..e91cddd480 100644 --- a/ydb/core/kqp/executer_actor/kqp_executer_impl.h +++ b/ydb/core/kqp/executer_actor/kqp_executer_impl.h @@ -906,10 +906,10 @@ protected: BuildSinks(stage, task, secureParams); }; - if (source.GetSequentialInFlightShards()) { + THashMap<ui64, TShardInfo> partitions = PrunePartitions(source, stageInfo, HolderFactory(), TypeEnv()); + if (partitions.size() > 0 && source.GetSequentialInFlightShards() > 0 && partitions.size() > source.GetSequentialInFlightShards()) { auto [startShard, shardInfo] = MakeVirtualTablePartition(source, stageInfo, HolderFactory(), TypeEnv()); if (Stats) { - THashMap<ui64, TShardInfo> partitions = PrunePartitions(source, stageInfo, HolderFactory(), TypeEnv()); for (auto& [shardId, _] : partitions) { Stats->AffectedShards.insert(shardId); } @@ -921,7 +921,6 @@ protected: return 0; } } else { - THashMap<ui64, TShardInfo> partitions = PrunePartitions(source, stageInfo, HolderFactory(), TypeEnv()); for (auto& [shardId, shardInfo] : partitions) { addPartiton(shardId, shardId, shardInfo, {}); } diff --git a/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp b/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp index a34b71bff0..f4ed0ed280 100644 --- a/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp +++ b/ydb/core/kqp/ut/perf/kqp_query_perf_ut.cpp @@ -272,7 +272,7 @@ Y_UNIT_TEST_SUITE(KqpQueryPerf) { for (const auto& stage : stages) { totalTasks += stage.GetMapSafe().at("Stats").GetMapSafe().at("TotalTasks").GetIntegerSafe(); } - UNIT_ASSERT_VALUES_EQUAL(totalTasks, 3); + UNIT_ASSERT_VALUES_EQUAL(totalTasks, EnableSourceRead ? 2 : 3); } Y_UNIT_TEST(Upsert) { diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto index 228efda1d1..07b5fe3d94 100644 --- a/ydb/core/protos/config.proto +++ b/ydb/core/protos/config.proto @@ -1352,7 +1352,7 @@ message TTableServiceConfig { optional bool EnablePredicateExtractForScanQueries = 36 [default = true]; optional bool EnablePredicateExtractForDataQueries = 37 [default = true]; optional bool EnableKqpImmediateEffects = 38 [default = true]; - optional bool EnableSequentialReads = 39 [default = false]; + optional bool EnableSequentialReads = 39 [default = true]; optional bool EnablePreparedDdl = 42 [default = false]; optional bool EnableSequences = 43 [default = true]; optional bool EnableAsyncComputationPatternCompilation = 48 [default = false]; diff --git a/ydb/core/sys_view/ut_kqp.cpp b/ydb/core/sys_view/ut_kqp.cpp index e7e9e2e7d8..55f9803bc5 100644 --- a/ydb/core/sys_view/ut_kqp.cpp +++ b/ydb/core/sys_view/ut_kqp.cpp @@ -607,7 +607,7 @@ Y_UNIT_TEST_SUITE(SystemView) { check.Uint64GreaterOrEquals(0); // CPUTime check.Uint64GreaterOrEquals(0); // CompileCPUTime check.Int64GreaterOrEquals(0); // CompileDuration - check.Uint64(iterators ? 4 : 1); // ComputeNodesCount + check.Uint64(iterators ? 2 : 1); // ComputeNodesCount check.Uint64(0); // DeleteBytes check.Uint64(0); // DeleteRows check.Int64Greater(0); // Duration |