Re: Index to support LIKE '%suffix' queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Index to support LIKE '%suffix' queries
Date: 2006-02-25 17:22:27
Message-ID: 11673.1140888147@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Florian Weimer <fw(at)deneb(dot)enyo(dot)de> writes:
> Is it possible to create an index to support queries of the form
> "column LIKE '%suffix'" (similar to an ordinary index for LIKE
> 'prefix%', which I also need)?

Sounds like what you *really* need is full-text search, not half
measures ... have you looked at tsearch2?

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Florian Weimer 2006-02-25 17:52:43 Re: Index to support LIKE '%suffix' queries
Previous Message Alvaro Herrera 2006-02-25 15:24:16 Re: Relation 0 does not exist