-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: internal retries cause wacky statement timings #50108
Copy link
Copy link
Closed
Labels
A-sql-executorSQL txn logicSQL txn logicA-sql-uiWhy is my query slow?Why is my query slow?C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
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.
@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".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-executorSQL txn logicSQL txn logicA-sql-uiWhy is my query slow?Why is my query slow?C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

