sql: alias for querying intents
Is your feature request related to a problem? Please describe.
When troubleshooting backups, we often need to look for blocked or stale intents. We do so via this query:
select * from
(select start_pretty, end_pretty, range_id, crdb_internal.range_stats(start_key)->'intent_count' as intent_count from crdb_internal.ranges_no_leases)
where intent_count != '0';
Operators and support people need to look up this query every time, it’s hard to remember, and (I think) not documented publicly.
Describe the solution you'd like
A simpler abstraction over this query, perhaps a SHOW INTENTS or a virtual table, and docs to go with it.
Jira issue: CRDB-7079
We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!