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
Create views over transaction_contention_events to help users troubleshoot locking contention #81466
Comments
So I've come up with a query that I believe surfaces all of the requested information... but it's a little unwieldy, since the information is located across several tables:
To get all of this information in a single view requires a lot of joins:
Here's some output from the console, after creating the view and running multiple workloads against a demo cluster:
The
As-is, this query performs a lot of joins and full scans across several tables. It's quite expensive when compared to a simpler view (
@kevin-v-ngo Do we want to simplify the view at all, to make this query less expensive? Or should we just try to make the CREATE statement as efficient as we can while keeping the same information? |
We can actually simplify this a bit using the
|
@kevin-v-ngo I'm not sure this is a quick win at this point. Might be best to put it on the backlog. We should spend some time thinking about what we want the view to look like (view name, column names, data types, query, etc). Also - the work on transaction-level execution insights might meet this need. WDYT? |
In 22.1, we released transaction_contention_events to help users troubleshooting locking contention. This is the base table surfacing raw information on specific transaction conflicts. We should create a view that joins this table with transaction_statistics, statement_statistics, and tables to quickly surface the following information for users:
Jira issue: CRDB-15169
The text was updated successfully, but these errors were encountered: