⬅︎ Back to UPPER vs. ILIKE
FYI UPPER can use an index if you create the index to be uppercase, i.e.CREATE INDEX foo on bar (upper(col));after which a "select * from bar where upper(col) = "PETER"; should be alot faster.
Really?! I sort of not surprised. PostgreSQL rocks! I'll throw that in if and when I replace my ILIKE statements (that don't use wildcards) with UPPER ones.
Comment
FYI UPPER can use an index if you create the index to be uppercase, i.e.
CREATE INDEX foo on bar (upper(col));
after which a "select * from bar where upper(col) = "PETER"; should be alot faster.
Replies
Really?! I sort of not surprised. PostgreSQL rocks! I'll throw that in if and when I replace my ILIKE statements (that don't use wildcards) with UPPER ones.