Re: Performance ts_vector fulltext search

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Luigi Saggese <luigisag(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance ts_vector fulltext search
Date: 2013-04-11 14:58:46
Message-ID: 2751.1365692326@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Luigi Saggese <luigisag(at)gmail(dot)com> writes:
> I've configured 2 table like this
> ...
> CREATE INDEX "ix_fulltext_usp_what" ON "public"."User_Statement_Pivot"
> ("to_tsvector('italian'::regconfig, ""What""::text)",
> "to_tsvector('italian'::regconfig, ""What""::text)");

When I try that I get

ERROR: column "to_tsvector('italian'::regconfig, "What"::text)" does not exist

as indeed I should, because you seem to be confused about SQL quoting
rules --- that whole expression is being taken as a name. However, the
bigger problem here is that you're creating btree indexes, which are not
useful for full text search. They need to be gin or gist indexes. See
examples at

http://www.postgresql.org/docs/9.2/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Thiyagarajan, Palaniappan 2013-04-11 21:09:33 PsqL8.3
Previous Message Steve Singer 2013-04-11 14:20:11 Re: slow bitmap heap scans on pg 9.2