Tag: DATABASE

How I Finally Got JSONB Right in PostgreSQL
DATABASE

How I Finally Got JSONB Right in PostgreSQL

I avoided JSONB for years ( like, actual years ). Not because I didn't know it existed, but because every time I reached for it, someone would say "just use a separate table" and I'd back off. Turns out, they were wrong. Not always wrong, but

davide
Why Does Your PostgreSQL Query Suck?
DATABASE

Why Does Your PostgreSQL Query Suck?

I've written slow queries. You've written slow queries. We all pretend EXPLAIN ANALYZE is fine and then close the tab. But at some point you hit a table with 5 million rows and suddenly your app feels like it's running on a potato. Indexes

davide
5 JSONB Tricks I Actually Use
DATABASE

5 JSONB Tricks I Actually Use

I stored JSON in PostgreSQL for two years before I realized I was doing it wrong. I mean, I had a column called metadata typed as TEXT. I was stringifying before insert and parsing after select. It worked. It was also slow, unqueryable, and frankly embarrassing. JSONB fixes all of

davide
SQLite: The Database I Keep Underestimating
DATABASE

SQLite: The Database I Keep Underestimating

I keep underestimating SQLite. Every time I reach for PostgreSQL or MySQL for a new project, I stop and think: does this actually need a server process running 24/7? Most of the time, the answer is no. SQLite gets treated like a toy database, something for prototypes and side

davide
Redis Caching Strategies I Actually Use In Production
DATABASE

Redis Caching Strategies I Actually Use In Production

I've been running Redis as a cache layer for years, and most setups I see out there are either over-engineered or barely doing anything useful. There's a sweet spot between caching everything and caching nothing, and it's smaller than you think. Here's

davide
ESC
// awaiting input_