-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
outliers: collect statement fingerprint id #80989
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @Azhng and @matthewtodd)
pkg/sql/crdb_internal.go
line 6089 at r1 (raw file):
transaction_id UUID NOT NULL, statement_id STRING NOT NULL, statement_fingerprint_id STRING NOT NULL
Hmm are we sure we want to have a string representation of the fingerprints ID? At least in SQL CLI, we haven't really committed to a pretty format of the fingerprint. Also encoding it here in the virtual table handler will make joining to the exsting stmt/txn stats table difficult.
pkg/sql/sqlstats/outliers/outliers.proto
line 30 at r1 (raw file):
bytes id = 1 [(gogoproto.customname) = "ID"]; uint64 fingerprint_id = 3 [(gogoproto.customname) = "FingerprintID", (gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.StmtFingerprintID"];
nit: maybe this can be below the latency_in_seconds
since it's tag is higher :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @Azhng)
pkg/sql/crdb_internal.go
line 6089 at r1 (raw file):
Previously, Azhng (Archer Zhang) wrote…
Hmm are we sure we want to have a string representation of the fingerprints ID? At least in SQL CLI, we haven't really committed to a pretty format of the fingerprint. Also encoding it here in the virtual table handler will make joining to the exsting stmt/txn stats table difficult.
Good call, I was wondering about this and saw the base-10 string encoding elsewhere, but now I see we just use bytes, yes? Will change.
pkg/sql/sqlstats/outliers/outliers.proto
line 30 at r1 (raw file):
Previously, Azhng (Archer Zhang) wrote…
nit: maybe this can be below the
latency_in_seconds
since it's tag is higher :P
Good question. I was looking to have the ordering here mirror the column ordering in the node_execution_outliers
table, assuming there's some logical grouping there. (In particular, having these ID fields at the top feels good.) Maybe I just renumber them since nobody cares yet?
This change also helps set us up for #79451, where we'll be working with per-fingerprint statement latencies. Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @Azhng)
bors r+ |
Build succeeded: |
This change also helps set us up for #79451, where we'll be working with
per-fingerprint statement latencies.
Release note: None