Text matching is a pretty common problem while working with SQL. LIKE, SIMILAR TO and POSIX are pretty common querying use cases. But, taking advantage of indexes when using these is something to pay attention to. A simple b-tree index on a text/varc...