
CREATE INDEX ON orders (placed_at) WHERE status = 'pending';
CREATE INDEX ON orders (customer_id) INCLUDE (status, total_cents)Tatipelly, Sunil. Senior Backend Engineer Interview Guide: The Complete Guide to Backend Programming, APIs, Databases, System Design, Distributed Systems, and Production Engineering Interviews (p. 192). (Function). Kindle Edition.
CREATE INDEX ON customers (LOWER(email));
So:
WHERE LOWER(email) = '[email protected]'
can use it.
But
WHERE email = '[email protected]'
can not use it.