profiling-statement-fingerprints

Rank CockroachDB statement fingerprints by latency, CPU, and failure rates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Aggregated SQL statistics from crdb_internal.statement_statistics are used to rank and analyze statement fingerprints, enabling you to surface slow, resource-intensive, or error-prone queries even without DB Console access.

Core Features & Use Cases

  • Fingerprint ranking: prioritize statements by latency, CPU usage, contention, and failure rates.
  • Historical trend analysis: monitor performance over hours/days to identify regressions and workload shifts.
  • Safe, read-only analysis: relies on crdb_internal views with defensive checks and no data modification.

Quick Start

Run a time-bounded analysis of crdb_internal.statement_statistics to surface the slowest fingerprints within your chosen window.

Frequently Asked Questions about profiling-statement-fingerprints

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

FAQPage Schema
How do I identify slow queries from historical SQL statistics in CockroachDB?

You can identify slow queries by analyzing historical SQL statistics from crdb_internal.statement_statistics to rank statement fingerprints by latency, CPU usage, contention, and failure rates. This surfaces resource-intensive queries for performance triage.

Can I analyze CockroachDB query performance without DB Console access?

Yes, you can analyze query performance without DB Console access by querying crdb_internal.statement_statistics directly via SQL. This requires SQL privileges with VIEWACTIVITY or VIEWACTIVITYREDACTED to access the aggregated statement data.

How do I find error-prone SQL statement fingerprints in a multi-tenant CockroachDB deployment?

To find error-prone SQL statement fingerprints in a multi-tenant CockroachDB deployment, rank historical statements from crdb_internal.statement_statistics by their failure rates. This read-only analysis helps surface problematic queries safely.

What SQL privileges are needed to run historical query pattern analysis on CockroachDB?

Historical query pattern analysis on CockroachDB requires SQL privileges with either VIEWACTIVITY or VIEWACTIVITYREDACTED. These permissions allow you to access crdb_internal.statement_statistics for aggregated and sampled metrics.

How do I monitor CockroachDB workload shifts and performance regressions over time?

You monitor CockroachDB workload shifts and performance regressions by running time-bounded historical trend analysis on crdb_internal.statement_statistics. This tracks statement fingerprint performance over hours or days to identify changes.

Does historical statement fingerprint analysis modify database data or impact performance?

Historical statement fingerprint analysis is a safe, read-only operation that does not modify database data. It queries crdb_internal views with defensive JSON handling for missing fields, ensuring no impact on database performance.