Re: LIKE and REGEX optimization - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: LIKE and REGEX optimization
Date
Msg-id 20080117121018.GA30338@depesz.com
Whole thread Raw
In response to Re: LIKE and REGEX optimization  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-general
On Tue, Jan 15, 2008 at 04:49:41PM -0600, Scott Marlowe wrote:
> This query is not capable of using an index on name, since you can't
> use an index with a like beginning with a %... So

actually you can. you just can't use index for like %something%, but it
can be solved using trigrams or another approaches. for example:
http://www.depesz.com/index.php/2007/09/15/speeding-up-like-xxx/

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Can't make backup (again)
Next
From: Sebastián Baioni
Date:
Subject: Re: Can't make backup (again)