Running
WHERE name ILIKE '%term%' on a 2M-row customers table forces a sequential scan every time because leading wildcards defeat regular B-tree indexes. Enabling pg_trgm and adding a GIN (name gin_trgm_ops) index dropped our admin search bar latency from 1.2 seconds down to 6ms.commit 345b8c8