Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance regression if sql.metrics.statement_details.enabled is disabled #106811

Closed
j82w opened this issue Jul 14, 2023 · 0 comments · Fixed by #109785
Closed

Performance regression if sql.metrics.statement_details.enabled is disabled #106811

j82w opened this issue Jul 14, 2023 · 0 comments · Fixed by #109785
Assignees
Labels
A-cluster-observability Related to cluster observability C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@j82w
Copy link
Contributor

j82w commented Jul 14, 2023

There is a performance regression when disabling sql.metrics.statement_details.enabled. It will see that every execution is the first time the query was executed so it will enabled execution stats collection for all executions. This is a bug caused by always collecting the execution stats of the first time a statement is executed.

Jira issue: CRDB-29724

@j82w j82w added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-cluster-observability A-cluster-observability Related to cluster observability labels Jul 14, 2023
@j82w j82w self-assigned this Jul 31, 2023
craig bot pushed a commit that referenced this issue Sep 1, 2023
109785: sql: fix performance when disabling sql.metrics.statement_details r=j82w a=j82w

There is a performance regression when disabling
sql.metrics.statement_details.enabled. It will see that every execution is the first time the query was executed so it will enabled execution stats collection for all executions. This is a bug caused by always collecting the execution stats of the first time a statement is executed in #89418.

Fixes: #106811

Release note (bug fix): Fixes a bug causing performance regression when disabling `sql.metrics.statement_details.enabled` which caused execution stats to be 
collected for all queries instead of the default one percent.

Co-authored-by: j82w <[email protected]>
@craig craig bot closed this as completed in 716f6a9 Sep 1, 2023
blathers-crl bot pushed a commit that referenced this issue Sep 1, 2023
…bled

There is a performance regression when disabling
sql.metrics.statement_details.enabled. It will see that every execution
is the first time the query was executed so it will enabled execution
stats collection for all executions. This is a bug caused by always
collecting the execution stats of the first time a statement is
executed in #89418.

Fixes: #106811

Release note (bug fix): Fixes a bug causing performance regression
when disabling `sql.metrics.statement_details.enabled` which caused
execution stats to be collected for all queries instead of the default
one percent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cluster-observability Related to cluster observability C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant