-
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.
sql: collect exec stats for a statement if we see it for the first time
Previously, we would decide whether we collect the execution stats for a statement based on `sql.txn_stats.sample_rate` that will determine the stats collection on a txn basis. This commit additionally begins collecting the stats on a per stmt basis if it is the first time we see the stmt. We are careful not to populate txn stats for explicit txns if the exec stats collection wasn't enabled on a txn level so that we don't provide an incomplete picture. Release note (sql change): CockroachDB will now collect execution stats for all statements when seen for the first time. In order to disable this behavior, `sql.txn_stats.sample_rate` cluster setting needs to be set to 0 (this will disable all execution stats collection).
- Loading branch information
1 parent
f2eb624
commit 125f6e6
Showing
4 changed files
with
43 additions
and
22 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