The Senior DBA Handbook
Curated wisdom for building scalable, secure, and performant databases.
Normalization (up to 3NF) is your default. It ensures data integrity, prevents anomalies, and keeps storage lean. However, in high-scale systems, joins can become a bottleneck.
Denormalization is a performance optimization. We selectively duplicate data to avoid expensive joins in read-heavy paths. Use it sparingly, and only when query latency justifies the added complexity of maintaining data consistency.
Indexing is a double-edged sword. While indexes speed up SELECTs, they slow down INSERTs and UPDATEs. A Senior DBA favors 'Selective Indexing'—indexing only what's truly needed for common query predicates.
Vacuuming is not optional. PostgreSQL uses MVCC, meaning every update creates a new 'tuple'. Without regular vacuuming, your tables will 'bloat', leading to massive performance degradation. Enable autovacuum and tune it for your workload.
Row Level Security (RLS) is transformative for multi-tenant apps. It pushes authorization logic down to the engine, ensuring a user only ever sees their own data, regardless of bugs in the application code.
Schemas are your friend. Use different PostgreSQL schemas to isolate system-level functions from public-facing tables. Combine this with the Principle of Least Privilege: your application user should only have the minimum permissions needed to function.
End of Current Handbook — Version 2026.1