-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
123414: sql: grant/revoke on a large number of objects can create a lot of jobs r=Dedej-Bergin a=Dedej-Bergin Previously we would create multiple jobs for granting on multiple tables and types within one transaction. This caused a performance slowdown, these code changes skip the making of multiple jobs and just execute the grants in a batch. Fixes:#117643 Release note(performance improvement): multiple grants on tables and types within one transaction now run faster. 123696: sqlstats: fix sampling logic for first recording of a statement r=xinhaoz a=xinhaoz By default we sample execution stats for 1% of statements, (`sql.txn_stats.sample_rate`). We also turn on sampling if this is the first time we're recording this fingerprint in the application container. This 'sample on first encounter' logic did not factor in the scenario where we may be unable to write new fingerprints due to reaching max container capacities. Previously, this meant that once the containers were full we'd begin to trace every fingerprint that did not already get recorded. This commit ensures that we also check the capacity when deciding to sample a fingerprint we haven't recorded yet, skipping the sampling if it is full. Note that although the container may reach capacity during the statement's execution, it's more important that we stop sampling once we are sure the fingerprint cannot be written to the container. Fixes: #123690 Release note: None Co-authored-by: Bergin Dedej <bergin.dedej@cockroachlabs.com> Co-authored-by: Xin Hao Zhang <xzhang@cockroachlabs.com>
- Loading branch information
Showing
17 changed files
with
386 additions
and
64 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
Oops, something went wrong.