Hi,

Are indexes on VARCHAR columns used with the LIKE operator, and if so, how efficiently are they used?

I can imagine that using indexes can be easy with the starting literal characters up to the first percent sign such as in:

LIKE 'ZOE%QQWE%'

But, after the first % sign, things can get more difficult.

The reason I am asking is that we are thinking about discriminating between rows of a table based on a VARCHAR column containing various one-character "flags". We could then use the LIKE operator for formulating filter conditions.

Any help is appreciated!

Regards
Peter

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to