triaging-live-sql-activity

Diagnose live CockroachDB cluster performance issues via SQL interfaces and crdb_internal views.

3|3|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/cockroachdb/claude-plugin --skill triaging-live-sql-activity-cockroachdb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: triaging-live-sql-activity
Source: https://github.com/cockroachdb/claude-plugin/tree/main/skills/observability-and-diagnostics/triaging-live-sql-activity
Command: npx skills add https://github.com/cockroachdb/claude-plugin --skill triaging-live-sql-activity-cockroachdb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Diagnoses live CockroachDB cluster performance issues by surfacing currently active long-running queries, busy sessions, and in-progress transactions using SQL-only interfaces.

Core Features & Use Cases

  • SQL-only triage: Use SHOW CLUSTER STATEMENTS, SHOW CLUSTER SESSIONS, and crdb_internal.cluster_transactions to quickly assess cluster load.
  • Scope of visibility: Works without DB Console or external monitoring; suitable for multi-tenant or restricted environments with redacted query text when needed.
  • Drill-down workflows: Filter by application, user, or client to pinpoint problematic components and plan action (cancellation if necessary).

Quick Start

To triage a live cluster, run triage commands to list current statements, sessions, and transactions and analyze the results.

Frequently Asked Questions about triaging-live-sql-activity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose slow CockroachDB cluster performance using SQL?

Diagnose slow CockroachDB cluster performance by running SHOW CLUSTER STATEMENTS, SHOW CLUSTER SESSIONS, and querying crdb_internal.cluster_transactions to surface active long-running queries, busy sessions, and in-progress transactions.

Can I triage live SQL activity without DB Console access?

Yes, you can triage live SQL activity without DB Console access by using SQL-only interfaces like SHOW CLUSTER STATEMENTS and crdb_internal views, which is suitable for multi-tenant or restricted environments.

What privileges are needed to view active CockroachDB queries?

Viewing active CockroachDB queries requires relevant privileges such as VIEWACTIVITY or VIEWACTIVITYREDACTED, and executing cancellations requires CANCELQUERY or CANCELSESSION with appropriate authorization.

How do I find runaway workloads causing high CPU in CockroachDB?

Find runaway workloads causing high CPU by using SQL interfaces to surface currently active long-running queries and in-progress transactions, then drill down to filter by application, user, or client.

Does CockroachDB support redacted query text for restricted environments?

Yes, CockroachDB supports redacted query text for restricted environments by utilizing the VIEWACTIVITYREDACTED privilege, allowing you to assess cluster load without exposing sensitive query details.