Skip to content

Commit dd57482

Browse files
committed
sql: use soft limit for scan distribution by default
Release note (sql change): The default value of `use_soft_limit_for_distribute_scan` session variable has been changed to `true`. This means that, by default, the soft limit (if available) will be used to determine whether a scan is "large" and, thus, should be distributed. For example, with "estimated row count: 100 - 10,000" we'll use 100 as the estimate to compare against the value of `distribute_scan_row_count_threshold`.
1 parent 5cb14e2 commit dd57482

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

pkg/sql/logictest/testdata/logic_test/information_schema

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4162,7 +4162,7 @@ use_cputs_on_non_unique_indexes off
41624162
use_improved_routine_dependency_tracking on
41634163
use_pre_25_2_variadic_builtins off
41644164
use_proc_txn_control_extended_protocol_fix on
4165-
use_soft_limit_for_distribute_scan off
4165+
use_soft_limit_for_distribute_scan on
41664166
variable_inequality_lookup_join_enabled on
41674167
vector_search_beam_size 32
41684168
vector_search_rerank_multiplier 50

pkg/sql/logictest/testdata/logic_test/pg_catalog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3176,7 +3176,7 @@ use_declarative_schema_changer on
31763176
use_improved_routine_dependency_tracking on NULL NULL NULL string
31773177
use_pre_25_2_variadic_builtins off NULL NULL NULL string
31783178
use_proc_txn_control_extended_protocol_fix on NULL NULL NULL string
3179-
use_soft_limit_for_distribute_scan off NULL NULL NULL string
3179+
use_soft_limit_for_distribute_scan on NULL NULL NULL string
31803180
variable_inequality_lookup_join_enabled on NULL NULL NULL string
31813181
vector_search_beam_size 32 NULL NULL NULL string
31823182
vector_search_rerank_multiplier 50 NULL NULL NULL string
@@ -3419,7 +3419,7 @@ use_declarative_schema_changer on
34193419
use_improved_routine_dependency_tracking on NULL user NULL on on
34203420
use_pre_25_2_variadic_builtins off NULL user NULL off off
34213421
use_proc_txn_control_extended_protocol_fix on NULL user NULL on on
3422-
use_soft_limit_for_distribute_scan off NULL user NULL off off
3422+
use_soft_limit_for_distribute_scan on NULL user NULL on on
34233423
variable_inequality_lookup_join_enabled on NULL user NULL on on
34243424
vector_search_beam_size 32 NULL user NULL 32 32
34253425
vector_search_rerank_multiplier 50 NULL user NULL 50 50

pkg/sql/logictest/testdata/logic_test/show_source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ use_declarative_schema_changer on
253253
use_improved_routine_dependency_tracking on
254254
use_pre_25_2_variadic_builtins off
255255
use_proc_txn_control_extended_protocol_fix on
256-
use_soft_limit_for_distribute_scan off
256+
use_soft_limit_for_distribute_scan on
257257
variable_inequality_lookup_join_enabled on
258258
vector_search_beam_size 32
259259
vector_search_rerank_multiplier 50

pkg/sql/vars.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ var varGen = map[string]sessionVar{
751751
Get: func(evalCtx *extendedEvalContext, _ *kv.Txn) (string, error) {
752752
return formatBoolAsPostgresSetting(evalCtx.SessionData().UseSoftLimitForDistributeScan), nil
753753
},
754-
GlobalDefault: globalFalse,
754+
GlobalDefault: globalTrue,
755755
},
756756

757757
// CockroachDB extension.

0 commit comments

Comments
 (0)