GROUP BY, HAVING, and Aggregations — The Complete Mental Model
Build the mental model of how SQL groups, aggregates, and filters — then GROUPING SETS, ROLLUP, FILTER, and DISTINCT aggregates all fall into place.
Build the mental model of how SQL groups, aggregates, and filters — then GROUPING SETS, ROLLUP, FILTER, and DISTINCT aggregates all fall into place.
Three ways to break up a complex query — subqueries, CTEs, and temp tables — with PostgreSQL benchmarks so you pick the right tool instead of guessing.
The 10 SQL habits senior reviewers flag on sight — from SELECT * to NOT IN with NULLs — and the correct patterns to replace them.
How streaming replication, replica lag, read/write splitting, and PgBouncer connection pooling scale SQL from thousands to millions of users.
After a decade shipping both to production — where PostgreSQL wins, where MySQL wins, where the gap closed, and my default recommendation for a new backend in 2026.
Store, query, index, and mutate semi-structured data inside PostgreSQL — operators, GIN indexes, JSONPath, mutation, and when not to use JSONB.
A real optimization story: an analytics query that timed out in production, the step-by-step diagnosis with every EXPLAIN plan, and the five changes that took it from 45 seconds to 200 milliseconds.
The most common performance bug in ORM-backed applications, explained from the SQL up — what N+1 is, how to detect it, and four concrete fixes with JPA/Hibernate examples.
A practical deep dive into range, hash, and directory-based sharding — routing, rebalancing, cross-shard queries, and global IDs.
Normalize until it hurts, denormalize until it works — an opinionated, code-heavy field guide to schema design that stays an asset instead of a liability.