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 its search. So, LIKE will be faster.
But of course REGEXP can handle more complex expressions.
Only use REGEXP if you absolutely have to.


Regards,
Arjen.

-- 
MySQL Training in Brisbane: 18-22 March, http://www.mysql.com/training/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Arjen G. Lentz <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Technical Writer, Trainer
/_/  /_/\_, /___/\___\_\___/   Brisbane, QLD Australia
       <___/   www.mysql.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to