Blog
Practical notes on databases, SQL workflows, and building better developer tools.

PostgreSQL Index Scan vs Sequential Scan Explained
Understand when PostgreSQL chooses an index scan vs sequential scan, how the query planner estimates costs, and how to tune scan behavior for faster production queries.
September 2, 2026 · 11 min read
Mobin Yazdanparast
PostgreSQL Unique Index vs Unique Constraint: Which to Use?
Every PostgreSQL unique constraint is enforced by a unique index, but not every unique index backs a constraint. Learn the real differences, the SQL for each, and when to use which.
September 1, 2026 · 8 min read
Mobin Yazdanparast
PostgreSQL Expression Indexes Explained (With Examples)
A practical guide to the PostgreSQL expression index: syntax, the IMMUTABLE requirement, exact planner matching, JSONB and date_trunc examples, and the write-amplification trade-off.
August 31, 2026 · 9 min read
Mobin Yazdanparast
PostgreSQL Partial Indexes Explained (With Examples)
Learn how PostgreSQL partial indexes use a WHERE clause on CREATE INDEX to shrink index size, cut write overhead, and speed up queries that target a hot subset of rows.
August 30, 2026 · 9 min read
Mobin Yazdanparast
PostgreSQL Composite Indexes Best Practices
Master PostgreSQL composite indexes best practices: column order, leftmost prefix rule, INCLUDE, and when to prefer multicolumn over separate indexes for faster queries.
August 21, 2026 · 7 min read
Mobin Yazdanparast
PostgreSQL BRIN Index Explained: A Complete Guide
A deep dive into PostgreSQL BRIN indexes: how they work, when to use them over B-tree, and how to configure them for large table optimization with minimal storage overhead.
August 20, 2026 · 9 min read
Mobin Yazdanparast
PostgreSQL GiST Index: When and Why to Use It
A practical guide to PostgreSQL GiST indexes: how they work, when they beat B-tree and GIN, and how to create and verify them with real, runnable examples.
August 19, 2026 · 5 min read
Mobin Yazdanparast
PostgreSQL GIN Index: Complete Guide
Learn how the PostgreSQL GIN index optimizes JSONB, arrays, and full-text search. Master creation, tuning, and comparisons to speed up queries.
August 17, 2026 · 8 min read
Mobin Yazdanparast
PostgreSQL Hash Index Explained: When to Use It
Explore the PostgreSQL hash index, its internal mechanics, limitations, and specific use cases for exact match queries to optimize your database performance.
August 7, 2026 · 8 min read
Mobin Yazdanparast
How PostgreSQL Index Internals Actually Work
A deep dive into PostgreSQL index internals, exploring B-tree architecture, CTID heap mapping, MVCC visibility, and scan operations.
August 5, 2026 · 9 min read
Mobin Yazdanparast