Y
Hacker News
new
|
ask
|
show
|
jobs
by
always_good
3316 days ago
WHERE lower(email) = lower('foo@example.com')
Is simple and hits an index on lower(email).
I'm not sure ILIKE can hit an index in your example.
1 comments
olavgg
3316 days ago
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...
link