pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Index to support LIKE '%suffix' queries
Date: Sat, 25 Feb 2006 18:52:43 +0100
Message-ID: <877j7jfhqs.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <11673.1140888147@sss.pgh.pa.us>
References: <87mzgfh69m.fsf@mid.deneb.enyo.de>
	<11673.1140888147@sss.pgh.pa.us>

* 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?



view thread (6+ messages)  latest in thread

Message-ID: <877j7jfhqs.fsf@mid.deneb.enyo.de>
Permalink:  ../877j7jfhqs.fsf@mid.deneb.enyo.de/
Also on:    postgresql.org/message-id/877j7jfhqs.fsf@mid.deneb.enyo.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: fw@deneb.enyo.de, tgl@sss.pgh.pa.us
  Subject: Re: Index to support LIKE '%suffix' queries
  In-Reply-To: <877j7jfhqs.fsf@mid.deneb.enyo.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox