PostgreSQL: The PhD Student's Database
PostgreSQL is like that brilliant PhD student who knows everything but can't explain why the coffee machine is broken. Incredibly powerful, supports every feature known to humanity, and will absolutely murder your performance if you don't tune it properly.
Had a client's database slow to a crawl because autovacuum couldn't keep up with updates. The "solution"? Hire a PostgreSQL consultant at $400/hour who spent three days tweaking vacuum settings. Total damage: $8,400 plus a week of angry users. The settings that fixed it? Five lines in postgresql.conf that aren't documented anywhere reasonable.
Version-specific gotcha that bit me hard: PostgreSQL 17.0 had a parallel query bug that caused deadlocks during bulk operations. Lost two nights of sleep before finding the GitHub issue. Fixed in 17.1, but if you're still on 17.0, add max_parallel_workers_per_gather = 0
to your config or enjoy the crashes.
PostgreSQL shines when you need complex queries, JSON handling, or custom data types. But it's a diva - needs babysitting, careful configuration, and a team that understands MVCC. Great for analytics workloads, terrible for teams that want to "just make it work."
MySQL: The Boring Choice That Actually Works
MySQL is that reliable Honda Civic of databases. Not exciting, everyone has opinions about it, but it just fucking works. Oracle's stewardship hasn't killed it yet, and the ecosystem is massive.
The dirty secret? Most apps don't need PostgreSQL's features. They need something that handles connections well, doesn't eat memory like Chrome, and has enough StackOverflow answers to debug at 3AM. MySQL delivers on all counts.
Real production story: Migrated a startup from PostgreSQL to MySQL 8.4 because their junior devs kept fucking up the vacuum configuration. Performance increased 40% overnight, not because MySQL is faster, but because the defaults are sane. No more autovacuum tuning, no more random slowdowns during bulk updates.
Current version warning: MySQL 8.4.0 has a binary log issue that can fill your disk if you're not careful with large transactions. Add `binlog_expire_logs_seconds = 604800` (7 days) to your config or watch your disk space vanish.
MySQL's weakness? It makes stupid decisions silently unless you set `sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO'`. Learn this config by heart or enjoy debugging phantom data corruption bugs.
MariaDB: MySQL's Rebellious Teenager
MariaDB started as "MySQL but better" and mostly delivers. Better defaults, more features, actual innovation. But "MySQL compatibility" is marketing bullshit - it'll break your app in subtle ways.
Personal disaster story: Updated from MariaDB 10.5 to 10.11 and suddenly all our UTF-8 data was corrupted. Turns out they changed the default charset handling. Six hours of downtime while we figured out the right charset conversion commands. Pro tip: Always test charset behavior when upgrading MariaDB.
The real problem with MariaDB? It's stuck between MySQL and PostgreSQL. If you want boring reliability, use MySQL. If you want advanced features, use PostgreSQL. MariaDB tries to be both and succeeds at neither.
Current gotcha: MariaDB 11.4 changed how it handles certain JOIN operations. If you're seeing weird query results after upgrading, check if your JOINs are using the old behavior assumptions.
SQLite: The Pocket Rocket
SQLite is perfect until it's not. Single file, no configuration, embedded, fast as hell for reads. Then you get concurrent writes and it shits the bed.
Used SQLite for a client project because "it's just a simple app." Famous last words. App got featured on Hacker News, concurrent users spiked, and SQLite started throwing SQLITE_BUSY
errors like confetti. Had to migrate to PostgreSQL in 6 hours while the site was getting hammered.
SQLite's sweet spot: Single-user apps, mobile apps, data analysis, anything where you control the writes. It's also bulletproof for caching - never had SQLite corruption in 5 years of production use.
Recent version note: SQLite 3.45.0 improved WAL mode performance, but it's still not designed for high concurrency. Don't use it for web apps unless you enjoy explaining downtime to stakeholders.
CockroachDB: The Expensive Lesson in Distributed Systems
CockroachDB is what happens when smart people solve hard problems and then charge you enterprise prices. Geo-distributed, auto-scaling, strongly consistent. Also complex as hell and costs more than your engineering team's salary.
War story: Tried CockroachDB for a fintech project because "we need global consistency." Spent 3 months learning how distributed transactions work, debugging clock skew issues, and optimizing queries for a distributed architecture. Final bill? $12k/month for what would have cost $200/month on PostgreSQL.
The reality check: Unless you're actually Netflix with data centers on multiple continents, you don't need CockroachDB. You need better backups and maybe a read replica.
Current pricing reality: CockroachDB Serverless starts at $3k/month for production workloads. Dedicated clusters start around $5k/month. PostgreSQL with proper high availability costs $500/month. Do the math.
Distributed systems are hard. Don't learn distributed systems under deadline pressure with angry users and a burning budget. Start with PostgreSQL, scale vertically until it hurts, then consider your distributed options.