-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
80887: stats: enable auto stats collection on system tables r=msirek a=msirek Fixes #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`, `system.table_statistics`, `system.jobs` and `system.scheduled_jobs`, no matter the value of the cluster setting. Autostats on the first two tables could potentially cause hangs, and autostats on the last two tables could potentially impact system performance. Release note: none Co-authored-by: Mark Sirek <[email protected]>
- Loading branch information
Showing
13 changed files
with
382 additions
and
186 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
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.