Re: Index to support LIKE '%suffix' queries - Mailing list pgsql-sql

From Florian Weimer
Subject Re: Index to support LIKE '%suffix' queries
Date
Msg-id 877j7jfhqs.fsf@mid.deneb.enyo.de
Whole thread Raw
In response to Re: Index to support LIKE '%suffix' queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Index to support LIKE '%suffix' queries
List pgsql-sql
* Tom Lane:

> Florian Weimer <fw@deneb.enyo.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?

Uh-oh, the table in question has got 50+ million rows (and is still
growing).  Each "document" contains about three words.  Do you think
tsearch2 could deal with that?


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Index to support LIKE '%suffix' queries
Next
From: Alvaro Herrera
Date:
Subject: Re: Index to support LIKE '%suffix' queries