Blog

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

Top 12 psql Commands You’ll Actually Use

Michael Patrick McCoy

If you're new to PostgreSQL, the psql shell can feel intimidating — but it shouldn’t. You only need a handful of commands to navigate, inspect objects, run queries, and troubleshoot. These are the 12 psql commands you will actually use all the time!


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

PostgreSQL Indexes Explained: How to Choose the Right One

Michael Patrick McCoy

PostgreSQL offers multiple index types, each optimized for different query patterns and data shapes. Understanding which one to use is one of the highest-ROI skills in database engineering.


Read More

Most Common SQL Mistakes (and How to Avoid Them)

Michael Patrick McCoy

SQL is powerful — but even experienced developers run into subtle mistakes that affect correctness, performance, or readability. In this article, we walk through the most common SQL pitfalls using PostgreSQL and the Pagila sample database, along with practical ways to avoid them.


Read More