-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add human-readable query identifiers in crdb_internal.statement_statistics and DB Console Statements page #91763
Description
Is your feature request related to a problem? Please describe.
In the DB Console SQL Activity->Statements page, there is no unique query identifier in the initial page. When you click into a query, you can see an identifier in the URL, such as http://127.0.0.1:26258/#/statement/true/4705782015019656142?appNames=
In this case 4705782015019656142 is the identifier. When querying crdb_internal.statement_statistics at the main table level there is no identifier that corresponds to 4705782015019656142. The only way to search for a query is using the metadata ->> ‘query’ clause like this:
where metadata ->> 'query' like '%SELECT city, id FROM vehicles WHERE city = $1%'
Sometimes if the full query text as shown in the console is entered, the filter will not find the given query string. You have to use some LIKE condition to find the query string. There are columns fingerprint_id and transaction_fingerprint_id in crdb_internal.statement_statistics but they are BYTE values that are not human-readable.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
cc: @kevin-v-ngo
Jira issue: CRDB-21417