SQLMedium
When does a Postgres index NOT get used?
Common causes: leading-column omitted from a composite index, function applied to the column (WHERE lower(email) = ...), data type mismatch in the predicate, planner statistics out of date, or the table is small enough that a sequential scan is faster.
Run EXPLAIN (ANALYZE, BUFFERS) to confirm.