Expression index

An expression index indexes the result of an expression or a function applied to a column, such as lower(email). It makes conditions that reuse exactly that expression usable by an index, which an index on the raw column would not allow.

Example

CREATE INDEX ON clients (lower(email));
SELECT * FROM clients WHERE lower(email) = 'a@b.fr';

Related concepts

The whole glossary