RE: REGEXP vs LIKE/OR

2008-08-15 Thread emierzwa
It looks like LIKE is only slightly faster(on my XP), hardly worth mentioning. Go with what is easier for you to read or for portability if you need it. IMHO set @a='gfdueruie baz hdhrh';select BENCHMARK(500, (select 1 from dual WHERE @a LIKE '%foo%' OR @a LIKE '%bar%' OR @a LIKE '%baz%')) as

Re: REGEXP vs LIKE

2002-03-03 Thread Arjen Lentz
Hi, On Tue, 2002-03-05 at 08:42, destr0 wrote: whigh one is faster? REGEXP or LIKE? LIKE is an SQL language construct, REGEXP is a function. LIKE only uses two simple wildcards (_ and *). Provided your LIKE pattern does not start with a wildcard, the server will be able to use an index for

Re: REGEXP vs LIKE

2002-03-03 Thread Jeremy Zawodny
On Mon, Mar 04, 2002 at 02:42:46PM -0800, destr0 wrote: filter fodder: mysql, database, sql whigh one is faster? REGEXP or LIKE? LIKE is generally faster. But LIKE can't do everything that REGEXP can, so that's probably no surprise. Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED]