in reply to
Re^3: Backslash and Underscore problem with DBI and PostgreSQL.
in thread Backslash and Underscore problem with DBI and PostgreSQL.
This may or may not be fast - it depends on how the query engine runs, and whether the optimizer can use an index when you apply a function on a column.
Probably premature optimization unless there are a lot of users, but PostgreSQL support indexes on expressions:
As always, "explain" can be used to examine the optimizer's query plan.