Skip to content
masterclass Buddy

PostgreSQL · Concept

B-tree index

A PostgreSQL B-tree is a sorted, balanced index for data with a defined order. It supports equality, ranges, null checks, some prefix matches, and ordered scans.

Last updated

Syntax

CREATE INDEX [ IF NOT EXISTS ] name ON table [ USING btree ] ( column [ ... ] );

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • CREATE INDEX
  • Hash indexes
  • GiST indexes
  • GIN indexes
  • B-tree operator classes
  • B-tree deduplication
  • Bottom-up index deletion

Source: PostgreSQL: Documentation: 18: 65.1. B-Tree Indexes. Checked 2026-11-03.