Tsearch & functional indexes

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Tsearch & functional indexes
Date: 2005-10-09 10:05:48
Message-ID: diaq1n$2hgl$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


In the tsearch2 documentation I see a lot of examples where you
add a column of type tsvector to your table and then indexing
that column.

Instead of adding the extra column, would it be possible to
just make a functional index something like this:

create index foo__tsearch on foo using gist (to_tsvector('simple'::text, text))

A brief informal experiment I tried suggests that
the create index command works; but that queries
using this approach were slower than having the
column around. I would have expected it to be faster,
since the disk space used should have been smaller.
Perhaps something about table statistics that I'm
not considering?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zlatko Matić 2005-10-09 10:07:41 problems with upgrade from 8.0.3 to 8.0.4, Windows
Previous Message shakahshakah@gmail.com 2005-10-09 09:32:49 Re: INSERT OR UPDATE?