Hacker News new | ask | show | jobs
by anthonyIPH 249 days ago
"Instead you should:

query WHERE name = ‘abc’

create an indexed UPPER(name) column"

Should there be an "or" between these 2 points, or am I missing something? Why create an UPPER index column and not use it?

2 comments

[and a third] OR use a case-insensitive collation for the name column.
I think they reversed the 2 expressions. You should use “WHERE UPPER(name) = ‘ABC’” if you want to use the index.