Re: Index problem.... GIST (tsearch2)

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Index problem.... GIST (tsearch2)
Date: 2004-10-07 23:44:35
Message-ID: 878yai6ql8.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


"Net Virtual Mailing Lists" <mailinglists(at)net-virtual(dot)com>(by way of Net Virtual Mailing Lists <mailinglists(at)net-virtual(dot)com>) writes:

> >SELECT * from sometable WHERE category1 IS NOT NULL
> > AND data_fti @@ to_tsquery('default', 'postgres');

What you can do is a partial index:

create index fulltextindex on sometable (...) WHERE category1 IS NOT NULL

This is even better than the is_null() index because it will still be able to
do the full text search. However note that having three entire full text
indexes is going to consume a lot of space and incur a lot of disk i/o
overhead to maintain.

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Sherry 2004-10-07 23:48:29 Re: [HACKERS] DDL triggers [was Re: database constraints]
Previous Message Kiarash Bodouhi 2004-10-07 23:44:27 Question from a newbie