File tree Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,13 @@ var retiredSettings = map[InternalKey]struct{}{
271271
272272// grandfatheredDefaultSettings is the list of "grandfathered" existing sql.defaults
273273// cluster settings. In 22.2 and later, new session settings do not need an
274- // associated sql.defaults cluster setting. Instead they can have their default
275- // changed with ALTER ROLE ... SET.
274+ // associated sql.defaults cluster setting (see the `vector_search_beam_size`
275+ // setting in vars.go for an example). A session setting can have its default
276+ // changed with ALTER ROLE ... SET, similar to this (the example assumes that
277+ // all roles should use the new default):
278+ //
279+ // ALTER ROLE ALL SET vector_search_beam_size=128;
280+ //
276281// Caveat: in some cases, we may still add new sql.defaults cluster settings,
277282// but the new ones *must* be marked as non-public. Undocumented settings are
278283// excluded from the check that prevents new sql.defaults settings. The
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ import (
4040 "github.com/cockroachdb/cockroach/pkg/sql/sessiondata"
4141 "github.com/cockroachdb/cockroach/pkg/sql/sessiondatapb"
4242 "github.com/cockroachdb/cockroach/pkg/sql/sqltelemetry"
43- "github.com/cockroachdb/cockroach/pkg/sql/vecindex"
4443 "github.com/cockroachdb/cockroach/pkg/util/duration"
4544 "github.com/cockroachdb/cockroach/pkg/util/errorutil/unimplemented"
4645 "github.com/cockroachdb/cockroach/pkg/util/hlc"
@@ -3998,7 +3997,7 @@ var varGen = map[string]sessionVar{
39983997 return strconv .FormatInt (int64 (evalCtx .SessionData ().VectorSearchBeamSize ), 10 ), nil
39993998 },
40003999 GlobalDefault : func (sv * settings.Values ) string {
4001- return strconv . FormatInt ( vecindex . SearchBeamSizeSetting . Get ( sv ), 10 )
4000+ return "32"
40024001 },
40034002 },
40044003}
Original file line number Diff line number Diff line change @@ -44,19 +44,6 @@ var StalledOpTimeoutSetting = settings.RegisterDurationSetting(
4444 settings .WithPublic ,
4545)
4646
47- // SearchBeamSizeSetting controls the number of candidates examined during
48- // vector index searches. It represents the number of vector partitions that are
49- // are considered at each level of the search tree. Higher values increase
50- // search accuracy but require more processing resources.
51- var SearchBeamSizeSetting = settings .RegisterIntSetting (
52- settings .ApplicationLevel ,
53- "sql.vecindex.search_beam_size" ,
54- "number of vector partitions searched at each level of the search tree " +
55- "(higher values increase accuracy but require more processing)" ,
56- 32 ,
57- settings .IntInRange (1 , 512 ),
58- )
59-
6047// VectorIndexEnabled is used to enable and disable vector indexes.
6148var VectorIndexEnabled = settings .RegisterBoolSetting (
6249 settings .ApplicationLevel ,
You can’t perform that action at this time.
0 commit comments