List:MySQL on Win32« Previous MessageNext Message »
From:Paul DuBois Date:July 4 1999 6:19pm
Subject:Re: LIKE vs. REGEXP
View as plain text  
>If I'm searching through 200K strings, and they are indexed, is it more
>efficient to use "string like '%a%' or string like '%b%' or string like
>'%c%'"  or
>to use 'string regexp [aA][bB][cC]'

Indexes aren't used if your pattern begins with %, so it doesn't matter
if they're indexed or not for the examples you give.  Don't know which
is faster, though.  The empirical test is in order.

Paul DuBois, paul@stripped
Northern League Chronicles:
LIKE vs. REGEXPSimson Garfinkel4 Jul
  • Re: LIKE vs. REGEXPPaul DuBois4 Jul