triaging-live-sql-activity

Identify long-running queries and active transactions on CockroachDB clusters using SHOW statements.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Diagnoses live cluster performance issues by identifying currently active long-running queries, busy sessions, and active transactions using SQL-only interfaces (SHOW statements and crdb_internal views) to provide immediate triage without requiring DB Console, HTTP endpoints, or Prometheus access.

Core Features & Use Cases

  • Identify long-running queries, active sessions, and in-progress transactions to quickly triage performance bottlenecks.
  • Drill down by application, user, or client to locate root causes and take corrective action.
  • Use safe, read-only diagnostic queries by default, with optional cancellation commands for qualified operators.

Quick Start

Run the triage queries to list current statements and sessions, then identify long-running queries and in-progress transactions.

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 triage live SQL activity to find long-running queries in CockroachDB?

You can identify in-progress transactions and busy sessions using crdb_internal.cluster_transactions and SHOW statements. These SQL-only interfaces provide ready-to-run templates to triage production CockroachDB clusters when users report slowness or unpredictable performance.

What is the best way to diagnose slow CockroachDB clusters without DB Console access?

The best way to diagnose slow CockroachDB clusters without DB Console access is using SQL-only diagnostic queries. SHOW statements and crdb_internal views provide immediate triage to identify long-running queries and active sessions via standard SQL clients.

Can I drill down into live cluster activity by application or user to locate performance bottlenecks?

Yes, you can drill down into live cluster activity by application, user, or client. This allows you to locate root causes of high CPU or unpredictable performance and take corrective action using safe, read-only diagnostic queries by default.

Does triaging live SQL activity require Prometheus or external monitoring tools?

No, triaging live SQL activity does not require Prometheus, DB Console, or HTTP endpoints. It relies exclusively on SQL-only interfaces using SHOW statements and crdb_internal views to provide immediate diagnostic capabilities for production CockroachDB clusters.

Are the SQL templates for triaging active transactions safe to run on production clusters?

Yes, the SQL templates for triaging active transactions are safe for production clusters. They use read-only diagnostic queries by default to identify long-running queries and busy sessions, with optional cancellation commands available only for qualified operators.