Effect of Regexp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pankajit09
    Contributor
    • Dec 2006
    • 296

    Effect of Regexp

    Code:
    SELECT 'a' REGEXP '^[a-d]';
    Does REGEXP in a SQL slows down the execution ?

    Also what is the difference between REGEXP and RLIKE ?
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    Regular expressions are a lot more complex than the simple searches, like MySQL's WHERE LIKE syntax.
    Because of that, they will usually perform somewhat slower.

    They can be highly useful in certain situations, but if you can manage without them I would advise you to do so.

    RLIKE is a synonym for REGEXP.
    See Regular Expressions in the MySQL manual.

    Comment

    Working...