-
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: trace execution stats for query diagnostics
The distsql processors are initialized with the Context in the eval context. If this context contains a tracing span that is recording, the processors will set up statistics collection and put them in the span as tags. The statement diagnostics code sets up a span but doesn't change this context, so statistics collection doesn't happen. We want these statistics in the trace, as they will soon be used to generate EXPLAIN ANALYZE diagrams for the bundles. This change fixes this issue and moves up the initialization of the planner so we can tweak it directly, which simplifies code. Release note (bug fix): statement diagnostics traces now contain processor statistics. Release justification: Bug fixes and low-risk updates to new functionality
- Loading branch information
1 parent
4ed99d9
commit e7afadb
Showing
3 changed files
with
38 additions
and
27 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