Managing databases

From rileyhilliard/claude-essentials · View interactive version

Managing databases is an AI agent skill from the GitHub repository rileyhilliard/claude-essentials. Database architecture and SQL guidance for PostgreSQL, DuckDB, Parquet, PGVector, and Neo4j. Use when designing schemas, choosing a storage engine, writing or reviewing non-trivial SQL, adding indexes, tuning slow queries, or configuring vector and graph workloads.

How to use this skill

Skill file

Managing Databases

Decision guidance for hybrid storage: PostgreSQL for transactional metadata, DuckDB over Parquet for analytics, PGVector for similarity search, Neo4j for relationship-heavy queries.

Which engine

| Workload | Use | Why |

| --- | --- | --- |

| Transactional CRUD, users, sessions, metadata with foreign keys | PostgreSQL | ACID, row locking, constraints |

| Aggregations, scans, ad-hoc exploration | DuckDB on Parquet | Columnar, vectorized, no ETL |

| Analytical storage and interchange | Parquet | Compressed, columnar, portable |

| Time series with point lookups | PostgreSQL + partitioning | Partition pruning plus indexes |

| Time series analytics | DuckDB on Parquet | Scan performance |

| Similarity search, RAG, hybrid keyword + vector | PostgreSQL + PGVector | Embeddings next to metadata |

| Multi-hop traversal, path finding, knowledge graphs | Neo4j | Index-free adjacency |

References

| Working on | Read |

| --- | --- |

| Postgres partitioning, autovacuum, maintenance | references/postgres-architecture.md |

| LATERAL, CTE materialization, DISTINCT ON, EXPLAIN red flags | references/postgres-querying.md |

| Planner misestimates on multi-column WHERE | references/postgres-extended-statistics.md |

| LIKE not using an index, composite index order, INCLUDE, param/column type mismatch | references/postgres-index-internals.md |

| FILTER, GROUPING SETS/ROLLUP/CUBE, NULLs in aggregates and windows | references/sql-aggregation-patterns.md |

| Pagination, NOT IN, DISTINCT-as-a-fix, correlated subqueries, functions in WHERE | references/sql-query-anti-patterns.md |

| DuckDB storage, threads, memory | references/duckdb-architecture.md |

| DuckDB-specific SQL | references/duckdb-querying.md |

| Parquet file sizing, partitioning, sort order | references/parquet-architecture.md |

| Parquet predicate pushdown and query tuning | references/parquet-querying.md |

| HNSW vs IVFFlat, index parameters | references/pgvector-architecture.md |

| Filtered and hybrid vector search | references/pgvector-querying.md |

| Graph modeling, indexes, supernodes | references/neo4j-architecture.md |

| Cypher tuning and anti-patterns | references/neo4j-querying.md |

SQL defaults

These hold for any query against a large table:

Engine defaults

Slow query triage

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.