Re:PostgreSQL 10 Beta 1 Released
by always_good on Friday May 19, 2017 @08:20AM
(#14374867)
WHERE lower(email) = lower('[email protected]')
Is simple and hits an index on lower(email).I'm not sure ILIKE can hit an index in your example.
It can if you use the pg_trgm extension, a good summary can be read here: https://niallburkley.com/blog/index-columns-for-like-in-post...
SELECT 1 FROM user_email WHERE email ILIKE '[email protected]';