Commit ea695fb
opt: set default optimizer_span_limit to 131072
Set the default value of the `optimizer_span_limit` session variable to
2^17 (131072) instead of 0 (no limit). This provides a reasonable upper
bound on the number of spans the optimizer will produce, preventing
pathological cases where large cross-products of IN sets produce
excessive spans.
Informs: #167620
Release note (sql change): The session variable `optimizer_span_limit`
now defaults to 131072. This bounds the number of spans the optimizer
will allow in constrained index scans generated during query
optimization. Queries that would exceed this limit will use fewer looser
spans with remaining filters instead. Set to 0 to disable the limit.
Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>1 parent 5b2bfa5 commit ea695fb
5 files changed
Lines changed: 6 additions & 6 deletions
File tree
- pkg/sql
- logictest/testdata/logic_test
- sessiondatapb
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3919 | 3919 | | |
3920 | 3920 | | |
3921 | 3921 | | |
3922 | | - | |
| 3922 | + | |
3923 | 3923 | | |
3924 | 3924 | | |
3925 | 3925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3320 | 3320 | | |
3321 | 3321 | | |
3322 | 3322 | | |
3323 | | - | |
| 3323 | + | |
3324 | 3324 | | |
3325 | 3325 | | |
3326 | 3326 | | |
| |||
3580 | 3580 | | |
3581 | 3581 | | |
3582 | 3582 | | |
3583 | | - | |
| 3583 | + | |
3584 | 3584 | | |
3585 | 3585 | | |
3586 | 3586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
817 | | - | |
| 817 | + | |
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3016 | 3016 | | |
3017 | 3017 | | |
3018 | 3018 | | |
3019 | | - | |
| 3019 | + | |
3020 | 3020 | | |
3021 | 3021 | | |
3022 | 3022 | | |
| |||
0 commit comments