Skip to content
Skills Library
Data & analytics · Analysis

role-database:performance-diagnostics

/role-database:performance-diagnostics

Database performance troubleshooting across all engines. PostgreSQL (pg_stat_statements, auto_explain, pg_locks, EXPLAIN ANALYZE BUFFERS), MySQL (EXPLAIN FORMAT=TREE, Performance Schema, InnoDB status, optimizer trace), MongoDB (explain executionStats, currentOp, profiler), Redis (SLOWLOG, LATENCY, MEMORY DOCTOR, bigkeys). Lock contention, deadlocks, I/O bottlenecks, memory pressure, benchmarking (pgbench, sysbench, YCSB). Use when troubleshooting slow queries, diagnosing lock contention, or investigating database performance issues.

Licence
MIT
Last repository change
24.07.2026

Assessment and security

80/ 100Class: good
Format15 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Database performance troubleshooting across all engines. PostgreSQL (pg_stat_statements, auto_explain, pg_locks, EXPLAIN ANALYZE BUFFERS), MySQL (EXPLAIN FORMAT=TREE, Performance Schema, InnoDB status, optimizer trace), MongoDB (explain executionStats, currentOp, profiler), Redis (SLOWLOG, LATENCY, MEMORY DOCTOR, bigkeys). Lock contention, deadlocks, I/O bottlenecks, memory pressure, benchmarking (pgbench, sysbench, YCSB). Use when troubleshooting slow queries, diagnosing lock contention, or investigating database performance issues.

Original author description

Database performance troubleshooting across all engines. PostgreSQL (pg_stat_statements, auto_explain, pg_locks, EXPLAIN ANALYZE BUFFERS), MySQL (EXPLAIN FORMAT=TREE, Performance Schema, InnoDB status, optimizer trace), MongoDB (explain executionStats, currentOp, profiler), Redis (SLOWLOG, LATENCY, MEMORY DOCTOR, bigkeys). Lock contention, deadlocks, I/O bottlenecks, memory pressure, benchmarking (pgbench, sysbench, YCSB). Use when troubleshooting slow queries, diagnosing lock contention, or investigating database performance issues.

How it works

  1. Diagnostic Methodology
  2. Reference Files
Original SKILL.md headings · 27 lines, 168 words
SKILL.md preview
---
name: role-database:performance-diagnostics
description: |
  Database performance troubleshooting across all engines. PostgreSQL (pg_stat_statements, auto_explain, pg_locks, EXPLAIN ANALYZE BUFFERS), MySQL (EXPLAIN FORMAT=TREE, Performance Schema, InnoDB status, optimizer trace), MongoDB (explain executionStats, currentOp, profiler), Redis (SLOWLOG, LATENCY, MEMORY DOCTOR, bigkeys). Lock contention, deadlocks, I/O bottlenecks, memory pressure, benchmarking (pgbench, sysbench, YCSB). Use when troubleshooting slow queries, diagnosing lock contention, or investigating database performance issues.
allowed-tools: Read, Grep, Glob, Bash
---

# Performance Diagnostics

## Diagnostic Methodology

1. **Identify the symptom**: Slow queries? High CPU? Connection exhaustion? Lock waits?
2. **Establish baseline**: What's normal? Compare current metrics to historical
3. **Narrow the scope**: Is it one query, one table, one connection, or systemic?
4. **Analyze the cause**: Use EXPLAIN, wait events, system metrics
5. **Fix and verify**: Apply fix, measure improvement, monitor for regression

## Reference Files

Load from `references/` based on what's needed:

### references/postgres-mysql-diagnostics.md
PostgreSQL: pg_stat_statements top queries, EXPLAIN ANALYZE BUFFERS, lock wait query, deadlock detection, bloat estimation, wait event analysis, auto_explain config.
MySQL: InnoDB buffer pool hit ratio, row lock stats, SHOW ENGINE INNODB STATUS, Performance Schema query digest, optimizer trace.
Load when: diagnosing performance issues in PostgreSQL or MySQL.

### references/mongodb-redis-benchmarking.md
MongoDB: profiler setup, explain executionStats, currentOp kill long-running operations.
Redis: latency measurement, memory analysis (bigkeys, MEMORY DOCTOR), SLOWLOG configuration.
Common issues/fixes table covering CPU, I/O, locks, deadlocks, connections, memory, replication, disk.
pgbench, sysbench, redis-benchmark usage.
Load when: diagnosing MongoDB/Redis issues or running performance benchmarks.
Files in this package (3)
  • SKILL.md 2 KB
  • references/mongodb-redis-benchmarking.md 3 KB
  • references/postgres-mysql-diagnostics.md 4 KB

Versions

The database has no other skills named role-database:performance-diagnostics.

Database snapshot: 13.11.2026 · package version 9efc3f4113e6 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90database-engineer
    Database architecture design, schema optimization, query performance tuning, and data migration. Handles PostgreSQL, MySQL, MongoDB, Redis. Use when user asks to design database, optimize queries, create migrations, or improve database performance. Do NOT use for frontend or application logic.
  • 100database-optimizer
    Optimizes database queries and improves performance across PostgreSQL and MySQL systems. Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies,…
  • 100database-optimizer
    Optimizes database queries and improves performance across PostgreSQL and MySQL systems. Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies,…
  • 100agent-database-expert
    Specialist subagent: Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.
  • 90mysql
    Plan and review MySQL/InnoDB schema, indexing, query tuning, transactions, and operations. Use when creating or modifying MySQL tables, indexes, or queries; diagnosing slow/locking behavior; planning migrations; or troubleshooting replication and connection issues. Load when using a MySQL database.
  • 95database-expert
    Advanced database design and administration for PostgreSQL, MongoDB, and Redis. Use when designing schemas, optimizing queries, managing database performance, or implementing data patterns.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.