PostgreSQL JSONB: Three Months of Pain and What I Learned
So here’s the thing nobody tells you about JSONB in Postgres: it’s fast until it’s not. We migrated our user preferences table to use JSONB columns three months ago. The pitch was simple - no more ALTER TABLE every time marketing wants to track a new preference. Just stuff it in JSON and call it a day. Seemed smart at the time. The honeymoon phase First two weeks were great. Engineers loved it. Product loved it. We shipped features faster because we didn’t need schema migrations for every little thing. Our user_settings column grew from tracking 5 fields to 23. No problem, right? ...