Use a partial index (e.g. WHERE status = 'pending' or WHERE deleted_at IS NULL) to keep index size tiny and writes fast when queries consistently filter on that predicate. Use GIN for multi-value containment: JSONB (@>), arrays, and full-text tsvector (@@). Use GiST for ranges, geometry, and pg_trgm/nearest-neighbor.
Follow-up Interview Question · Why must a query’s WHERE clause imply the partial index’s predicate for Postgres to use it?