forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stats: enable auto stats collection on system tables
Fixes cockroachdb#80123 Previously, mutations to system tables did not trigger automatic collection of statistics to influence optimizer costs and plan selection. This was inadequate because system tables are being used in increasingly sophisticated ways in queries, most notably around driving subsystems in CRDB, requiring avoidance of full table scans. Manual collection of stats on system tables is not sufficient to meet requirements as system tables are driven by automatic processes/jobs. To address this, this patch enables auto stats collection on system tables by default, which can be disabled by setting new cluster setting `sql.stats.system_tables_autostats.enabled` to false. Auto stats are always disabled on `system.lease` and `system.table_statistics`, no matter the value of the cluster setting, because they could potentially cause hangs if enabled. Release note: none
- Loading branch information
Mark Sirek
committed
May 3, 2022
1 parent
b2de15f
commit 134a62a
Showing
10 changed files
with
334 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.