Premature Optimization and Functional Dependency Trade-Offs

Learn about premature optimization and functional dependency trade-offs in PostgreSQL.

Premature optimization

The CSV-model anti-pattern database modeling makes it easy to fall into the trap of premature optimization. Only use denormalization techniques when you’ve made a strong case for needing them.

A strong case means we’ve benchmarked our application code against our real production data or a dataset that has the same distribution and is as real as possible and on a range of different server setups.

A strong case also means that we’ve spent time rewriting SQL queries to have them pass our acceptance tests. A strong case means we know how much time a query is allowed to spend and how much time it’s actually spending—in average, median, and 95th and 99th percentiles.

Get hands-on with 1200+ tech skills courses.