PostgreSQL Indexing: B-tree, GIN, Partial and Expression Indexes
Indexes are the single biggest lever for query performance. The right one turns a full table scan into a lookup of a few pages; the wrong ones slow down every write for nothing. B-tree: the default CREATE INDEX orders_customer_idx ON orders (customer_id); Work...