Re: strpos() && KMP

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Pavel Ajtkulov <ajtkulov(at)acm(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: strpos() && KMP
Date: 2007-08-01 22:41:31
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Pavel Ajtkulov wrote:
> Also, I advise to use "select .. where strpos(att, 'word') > 0;" instead "select .. where attr like '%word%'"
> (strpos must be faster than regex).

The LIKE code does not use the regex engine. See
src/backend/utils/adt/like.c and like_match.c - which recently got an
efficiency makeover, especially for MB charsets (and most especially for



In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-08-01 22:54:47 Re: Async Commit, v21 (now: v22)
Previous Message Pavel Ajtkulov 2007-08-01 20:18:22 strpos() && KMP