PMPhilip McClarenceinpostgresdba.hashnode.dev·May 6 · 8 min readPostgreSQL Plan Signatures: Quick ReferencePostgreSQL Plan Signatures: Quick Reference Reading a PostgreSQL plan is usually a shape-recognition task, not an analytical one. Once you have seen enough of them, a Seq Scan on a 50-million-row table with a selective filter tells you what to do wit...00
PMPhilip McClarenceinpostgresdba.hashnode.dev·May 5 · 7 min readPostgreSQL Query Anti-Patterns and Common MistakesIf you've ever been called in to look at a slow PostgreSQL database, you've probably noticed that the same handful of patterns show up again and again. Most queries aren't slow because they're subtle or because the planner made a creative mistake — t...00
PMPhilip McClarenceinpostgresdba.hashnode.dev·May 4 · 11 min readPostgreSQL Query Rewriting TechniquesWhy you'd care about this If you've ever added every index you can think of, pushed work_mem up, nudged the join strategy, and the query is still slow — the problem might not be the plan. It might be the query. Some of the fastest PostgreSQL performa...00
PMPhilip McClarenceinpostgresdba.hashnode.dev·May 1 · 11 min readPostgreSQL WHERE Clause OptimizationYou added the index. The query still runs a sequential scan. You re-read the plan, the index, the definition — everything looks right — and yet the planner refuses to use it. Nine times out of ten, the problem isn't the index. It's the WHERE clause: ...00
PMPhilip McClarenceinpostgresdba.hashnode.dev·Apr 30 · 11 min readPostgreSQL Aggregate and Window Function TuningIf you have ever watched a dashboard query get slower as the customer table grew, or seen a percentile_cont call suddenly spill 12 MB of temp files to disk, this article is for you. Aggregates and window functions are two of the highest-leverage area...00