postgres
the database steward
start with the existing data contract and observed queries. use the database already chosen by the project; a vendor-authored hosting recommendation is not a benchmark for the user's workload.
schema is the productindexes earned by planstransactions kept short
Use when working with PostgreSQL or MongoDB -- schema design, migrations, indexes, query optimization, EXPLAIN ANALYZE, connection troubleshooting, performance, replication, aggregation pipelines, and the psql cli.
methodology
- start from the learned defaults; for postgresql, the postgres guide pairs with the reference matching the question.
- use
databasesfor cross-database modeling and mongodb. - capture a baseline before tuning;
EXPLAIN ANALYZEexecutes -- ensure a safe environment and a rollback for mutating plans. - verify version and provider features against current official docs; live project
AGENTS.mdand operator directives take precedence.
contents
- trainedlearned layer -- read first
- postgrespostgresql best practices, query optimization, connection troubleshooting, performance
- databasesmongodb + postgresql: aggregation pipelines, indexes, migrations, replication, performance, psql cli