Performance & Tuning

JSONB Performance: What Developers Get Wrong

Michael Patrick McCoy

PostgreSQL’s JSONB type is incredibly powerful. It’s flexible, fast, and lets developers store semi-structured data without spinning up a separate document store. But here’s the truth: most JSONB performance problems come from developers treating JSONB like a magic box instead of a real data type with real indexing rules.


Read More

PostgreSQL Data Types You’re Probably Using Wrong

Michael Patrick McCoy

PostgreSQL gives you a huge toolbox of data types, which is great — until you accidentally pick the wrong one and end up fighting performance issues, storage problems, or subtle bugs that show up months later. In this article, we’ll go over the four data type pairs developers misuse the most, and I’ll show you the simple rules that will keep your schemas clean and your data correct.


Read More

Top 10 PostgreSQL Configs Every DBA Should Know

Michael Patrick McCoy

PostgreSQL comes with hundreds of settings — but as a DBA, you only need to master a small handful to dramatically improve performance. These are the 10 essentials every DBA should understand cold!


Read More

Understanding Sequential Scans — Why PostgreSQL Isn’t Using Your Index

Michael Patrick McCoy

Few things are more confusing to new PostgreSQL users than creating an index, running a query, and seeing PostgreSQL completely ignore it. We’ll walk through the most common reasons why PostgreSQL chooses a sequential scan, even when an index exists all while using clear examples.


Read More

The Beginner’s Guide to PostgreSQL EXPLAIN and EXPLAIN ANALYZE

Michael Patrick McCoy

PostgreSQL’s EXPLAIN and EXPLAIN ANALYZE commands are the gateway to understanding how a query actually executes. If you’ve ever looked at a query plan and felt like you were staring into the Matrix, this guide will help you make sense of it!


Read More

VACUUM, Autovacuum, and Bloat — The Plain-English Guide

Michael Patrick McCoy

It sounds mysterious, but VACUUM is actually one of the most important maintenance operations in PostgreSQL. This guide explains what VACUUM does, why autovacuum sometimes fails, what bloat really is, and how to check your database for problems — in simple, plain-English terms.


Read More