Author: David Sterling

David Sterling is a PostgreSQL database expert specializing in performance optimization, query tuning, and database administration. With years of experience helping developers and businesses optimize their PostgreSQL deployments, David shares practical insights and best practices on this blog. For inquiries or consulting, contact: [email protected]
postgresql

Why PostgreSQL CTEs Are Excellent: A Database Professional’s Perspective

As a database consultant who has spent years optimizing PostgreSQL implementations for businesses of all sizes, I’m frequently asked about query techniques that can transform complex database operations into maintainable, performant code. Common Table Expressions (CTEs) stand out as one of PostgreSQL’s most powerful features—and they’re often underutilized by developers who could benefit tremendously from […]

David Sterling 
postgresql

PostgreSQL 18 Innovations: Virtual Generated Columns, Async I/O, and What DBAs Need to Know

PostgreSQL 18, released in September 2025, brings transformative improvements that database administrators and developers need to understand. With the next major release (PostgreSQL 19) already on the roadmap for September 2026, now is the perfect time to explore what PostgreSQL 18 offers and why it matters for your production systems. Virtual Generated Columns: A Storage […]

David Sterling 
postgresql

Working with MSA Data in PostgreSQL Using PostGIS: A Complete Guide

Metropolitan Statistical Areas (MSAs) are critical geographic designations used by the U.S. Census Bureau to define urban regions for economic and demographic analysis. If you’re working with location-based data in PostgreSQL, PostGIS provides powerful tools for storing, querying, and analyzing MSA boundaries and associated data. In this guide, I’ll show you how to effectively work […]

David Sterling 
Features and extensions postgresql

PostgreSQL Developer Ergonomics: How EXPLAIN, SQL/JSON, and Replication Features Are Making Life Easier

When you’re deep in the trenches of database work—optimizing queries, debugging replication lag, or untangling JSON transforms—the quality of your tools matters. PostgreSQL has always been powerful, but the community has been laser-focused on something equally important: making that power accessible. Developer ergonomics—how smoothly you can understand, debug, and deploy database logic—is front and center […]

David Sterling 
postgresql

PostgreSQL Looking Ahead to 2026

PostgreSQL heads into 2026 with more momentum than it has had in years, driven by PostgreSQL 18’s async I/O, a rapidly maturing AI/vector story, and continued pressure to make Postgres cheaper to run in the cloud. For teams already standardized on Postgres, the next 12–18 months look less like “incremental tuning” and more like a […]

David Sterling 
AI Features and extensions pgvector

PostgreSQL pgvector and RAG: Best Practices and Examples for Better Results

Retrieval-Augmented Generation (RAG) has become one of the most practical applications of AI in production systems, and PostgreSQL’s pgvector extension has emerged as a robust solution for implementing vector search. However, getting optimal results requires more than just installing pgvector and throwing embeddings at it. Let’s explore proven best practices and real-world examples to help […]

David Sterling 
Features and extensions postgresql

What Is pgvector and When You Should Use It Instead of a Dedicated Vector DB

pgvector is a PostgreSQL extension that adds a native vector data type and similarity search so you can turn Postgres into a capable “vector DB” without adding new infrastructure. For many workloads—especially RAG over modest corpora, recommendations tied tightly to transactional data, and anomaly detection in existing Postgres-backed systems—pgvector is often simpler and cheaper than […]

David Sterling 
postgis postgresql

Beyond the Basics: 5 Powerful PostGIS Queries You Can Use Today

You’ve got PostGISqueries up and running—now what? If you completed the 15-minute quickstart, you’ve seen the basics: creating spatial tables, inserting points, and running simple distance queries. But PostGIS offers so much more. In this follow-up guide, I’ll show you five immediately useful PostGIS techniques that go beyond simple point queries. These are practical patterns […]

David Sterling