Databases

Schema design, IDs, connection pooling and query performance.
18
Dec
Street photograph by Stalin Pereira

Detecting N+1 Queries in Production Logs

Visual guide to detecting ORM issues and fixing with eager loading
1 min read
16
Dec
Street photograph by Stalin Pereira

Configuring PgBouncer for Serverless High Concurrency

Serverless functions turn traffic spikes into connection storms that can take Postgres down. Here's how PgBouncer's transaction pooling absorbs them: a production-ready config, pool sizing, what transaction mode breaks, and when a managed pooler is the better fit.
8 min read
10
Dec
Street photograph by Stalin Pereira

Collision Probability: Why 'Auto-Number' Feels Safe but Isn't

The math behind why CUIDs are safe enough for Google, and why Auto-Numbers create merge conflicts
2 min read
08
Dec
Street photograph by Stalin Pereira

Time-Sortable IDs: The Hidden Power of ULIDs

How combining a timestamp with randomness (ULID/CUID) gives you sorting for free without a `created_at` index
2 min read
30
Nov
Street photograph by Stalin Pereira

UUIDv4 is Killing Your Database Performance

Random UUIDv4 primary keys scatter inserts across your B-tree index, bloating it, thrashing the cache and inflating WAL. Here's how to measure the damage, and how UUIDv7 (RFC 9562, native in PostgreSQL 18) fixes it without giving up what made UUIDs useful.
8 min read
30
Nov
Street photograph by Stalin Pereira

Stop Using Auto-Increment IDs: The Security Risk

Why sequential IDs (1, 2, 3) leak business intelligence to competitors (enumeration attacks)
1 min read
23
Nov
Street photograph by Stalin Pereira

A Practical Guide to Implementing Semantic Search with Vector Databases (e.g., Pinecone, Milvus)

Beyond Keywords: Why Vector Databases Are the Real Future of Semantic Search, Not Your Old Fuzzy Search Hacks
1 min read