-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: don't apply disallow_full_table_scans to virtual tables #122708
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
O-support
Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
P-2
Issues/test failures with a fix SLA of 3 months
T-sql-queries
SQL Queries Team
Comments
DrewKimball
added
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
O-support
Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
T-sql-queries
SQL Queries Team
labels
Apr 19, 2024
This was referenced May 9, 2024
michae2
added a commit
to michae2/cockroach
that referenced
this issue
Sep 19, 2024
In cockroachdb#69371 we set the default for `large_full_scan_rows` to 1000. This default can be surprising for users of `disallow_full_table_scans`. Now that cockroachdb#122708 is fixed, let's set the default to 0 so that the exemption for small tables is opt-in rather than opt-out. Fixes: cockroachdb#130726 Release note (sql change): Set the default for session variable `large_full_scan_rows` to 0. This means that by default, `disallow_full_table_scans` will disallow _all_ full table scans, even full scans on very small tables.
michae2
added a commit
to michae2/cockroach
that referenced
this issue
Sep 20, 2024
In cockroachdb#69371 we set the default for `large_full_scan_rows` to 1000. This default can be surprising for users of `disallow_full_table_scans`. Now that cockroachdb#122708 is fixed, let's set the default to 0 so that the exemption for small tables is opt-in rather than opt-out. Fixes: cockroachdb#130726 Release note (sql change): Set the default for session variable `large_full_scan_rows` to 0. This means that by default, `disallow_full_table_scans` will disallow _all_ full table scans, even full scans on very small tables. If `large_full_scan_rows` is set > 0, `disallow_full_table_scans` will allow full scans estimated to read fewer than `large_full_scan_rows`.
craig bot
pushed a commit
that referenced
this issue
Sep 20, 2024
131040: sql: set default for large_full_scan_rows to 0 r=mgartner a=michae2 In #69371 we set the default for `large_full_scan_rows` to 1000. This default can be surprising for users of `disallow_full_table_scans`. Now that #122708 is fixed, let's set the default to 0 so that the exemption for small tables is opt-in rather than opt-out. Fixes: #130726 Release note (sql change): Set the default for session variable `large_full_scan_rows` to 0. This means that by default, `disallow_full_table_scans` will disallow _all_ full table scans, even full scans on very small tables. If `large_full_scan_rows` is set > 0, `disallow_full_table_scans` will allow full scans estimated to read fewer than `large_full_scan_rows`. Co-authored-by: Michael Erickson <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
O-support
Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
P-2
Issues/test failures with a fix SLA of 3 months
T-sql-queries
SQL Queries Team
Since we currently don't collect stats for virtual tables, (tracked in #27611), we unconditionally apply costing changes due to the
disallow_full_table_scans
setting for virtual table scans, even iflarge_full_scan_rows
is larger than the row count. Until tracked in #27611 is fixed, we should preventdisallow_full_table_scans
from applying to virtual tables, likely using a setting.Jira issue: CRDB-38031
The text was updated successfully, but these errors were encountered: