KSkiran sabneinkiransabne.dev·1d ago · 3 min readPostgreSQL Nested Loop: When Is It Actually a Problem?PROBLEM A Nested Loop join runs its inner side once per row on the outer side. That's the cheapest possible join when the outer side is small — and a real cost multiplier once it isn't. The operator i10
KSkiran sabneinkiransabne.dev·1d ago · 6 min readPostgreSQL Index Bloat: Why It Happens and How to Fix It"We have an index on that column, why is this still slow?" — because the index isn't broken. It's just fat. An index that used to fit in a handful of pages can silently grow to several times its neede00
KSkiran sabneinkiransabne.dev·Aug 25 · 7 min readPostgreSQL VACUUM: Why It Exists (and What Happens When It Falls Behind)If a table's disk size keeps climbing even though the row count hasn't — and queries against it have gotten slower for no reason you can point to — you're looking at the same root cause almost every t20
KSkiran sabneinkiransabne.dev·Aug 22 · 17 min readHow to Read a PostgreSQL Execution Plan: The Complete Guide (With Real Examples)If you've ever run EXPLAIN ANALYZE on a slow PostgreSQL query and stared at a wall of text with no idea what to do next, this guide is for you. We'll go from "what is this tree" to "here's exactly how20
KSkiran sabneinkiransabne.dev·Jan 9 · 3 min readHow do you write efficient pagination for millions of rows?Efficient pagination is absolutely critical when dealing with millions of rows in PostgreSQL — especially if you care about performance, index usage, and UX for APIs or UI pages. 1. OFFSET/LIMIT Pagin00