Skip to content

sql: internal retries cause wacky statement timings #50108

@solongordon

Description

@solongordon

Internal retries appear to screw up our accounting for statement timings. It seems like the total latency is attributed to all of the retries (or something along these lines), which can result in a large "Overhead" bucket and an absurdly large "Total Time" value. For example, this was the result of running SELECT crdb_internal.force_retry('5s') a single time.

Screen Shot 2020-06-11 at 1 05 31 PM

Screen Shot 2020-06-11 at 1 05 02 PM

@piyush-singh, do you have any thoughts about how internal retries should be accounted for in statement timings? It feels to me like this example should have been counted as only one execution of the statement, with the internal retry time categorized into its own bucket. Though I'm not sure how tricky it is to determine what time should count as "retry time".

Metadata

Metadata

Assignees

Labels

A-sql-executorSQL txn logicA-sql-uiWhy is my query slow?C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions