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
cluster-ui: speed up insights page request #107292
Conversation
Will update with Loom. |
6090f11
to
db63691
Compare
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.
Reviewed all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @koorosh and @xinhaoz)
pkg/ui/workspaces/cluster-ui/src/api/schemaInsightsApi.ts
line 199 at r2 (raw file):
) AS rank FROM crdb_internal.statement_statistics_persisted
is there any call to the transaction table that should also be updated on this PR?
db63691
to
00a12a3
Compare
Previously, maryliag (Marylia Gutierrez) wrote…
Ah yes, good point! I saw one use case and updated to change that, too. |
Epic: none Release note: None
00a12a3
to
ca37116
Compare
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.
Reviewed 1 of 1 files at r1, 6 of 6 files at r5, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @koorosh and @xinhaoz)
pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts
line 264 at r5 (raw file):
id => stmtFingerprintToQuery.get(id) ?? `Query unavailable for stmt fingerprint ${id}`,
is this showing on the UI? if so, use the full name, so statement
and not stmt
Previously, we were querying from `crdb_internal.statement_statistics` and `crdb_internal.transaction_statistics` on the schema insights and txn insights pages. Querying from this table is slow because it triggers a cluster-wide fanout to collect unflushsed sql stats. We can use the persisted table instead, which will lag behind a little in live data, but will be much faster to query from. Some tests for the txn contention details api are also added. Epic: none Fixes: cockroachdb#107291 Release note (bug fix): Schema insights page should hit request timeouts less frequently, if at all.
ca37116
to
076683a
Compare
Previously, maryliag (Marylia Gutierrez) wrote…
Done. |
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.
Reviewed 2 of 2 files at r6, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @koorosh)
TFTR! |
Build failed (retrying...): |
Build failed (retrying...): |
Build succeeded: |
blathers backport 23.1 |
Previously, we were querying from
crdb_internal.statement_statistics
andcrdb_internal.transaction_statistics
on the schema insights and txn insightspages. Querying from this table is slow because it triggers a cluster-wide
fanout to collect unflushsed sql stats. We can use the persisted table instead,
which will lag behind a little in live data, but will be much faster to query from.
Epic: none
Fixes: #107291
Release note (bug fix): Schema insights page should hit request timeouts less
frequently, if at all.
DB Console Loom, showing pages issuing requests work as expected:
https://www.loom.com/share/ef1baad105d0444596a32c8430234b88