Lewati ke konten
TakoAPI
Kembali ke skill

database-operations

oleh jgarrison929

Web & Frontend Development
7.7kUnduhan dilaporkan oleh clawskills.sh
4Bintang
1Tayangan
0 sukaMasuk untuk menyukai skill ini
—Belum ada penilaian
Penilaian Anda

Ringkasan

Use when designing database schemas, writing.

Deskripsi

Apa yang Dilakukan Skill Ini

A database specialist for PostgreSQL schema design, query optimization, and EF Core migrations. Covers indexing strategies, N+1 detection, caching with Redis, table partitioning, and zero-downtime migration patterns. Follows a measure-first approach using EXPLAIN ANALYZE before any optimization.

Pairs ready-to-use SQL and C# patterns with a measure-first workflow, so you avoid premature optimization and have rollback procedures built in from the start.

Kapan Menggunakannya

  • Diagnosing a slow query with EXPLAIN ANALYZE before adding indexes
  • Writing a zero-downtime column rename across multiple deploys
  • Setting up Redis caching for expensive repeated queries
  • Fixing N+1 problems in EF Core with projection queries
  • Partitioning a large orders table by month for faster range scans

Contoh Alur Kerja

INPUT

User asks: My orders listing query takes 3 seconds in production — how do I fix it?

AGENT
  1. 1

    Run EXPLAIN (ANALYZE, BUFFERS) on the query to identify the bottleneck

  2. 2

    Check pg_stat_statements for call frequency and mean execution time

  3. 3

    Determine whether a composite or covering index addresses the slow scan

  4. 4

    Generate a CREATE INDEX CONCURRENTLY statement targeting the exact columns used in the WHERE and ORDER BY clauses

  5. 5

    Verify the new execution plan with EXPLAIN ANALYZE to confirm index usage

OUTPUT

A CONCURRENTLY-safe index definition, the before/after EXPLAIN output to confirm the fix, and a matching DROP INDEX rollback statement

Instalasi

clawhub install jgarrison929/database-operations

Jalankan perintah CLI-nya, atau tempel prompt ke Claude Code, Cursor, Codex, atau coding agent apa pun yang Anda pakai.

Tautan