7 min read
Designing a Postgres Schema That Scales
Practical notes on indexing, normalization, and when to reach for arrays or JSONB.

Start with the queries
Model the reads you actually run, not the entities you imagine.
create index on posts (created_at desc);Add indexes for the filters and sorts your pages need. Measure before you optimize.
Arrays vs join tables
For a handful of tags per row, a `text[]` column is often simpler than a join table. Reach for a join table when you need to query the relationship itself.
This is placeholder text — swap in your own hard-won lessons.
Written by the editor
Notes from day-to-day engineering work. Replace this bio with your own — a line about who you are and what you build goes a long way with readers.