Re: Performance ts_vector fulltext search - Mailing list pgsql-performance

From Tom Lane
Subject Re: Performance ts_vector fulltext search
Date
Msg-id 2751.1365692326@sss.pgh.pa.us
Whole thread Raw
In response to Performance ts_vector fulltext search  (Luigi Saggese <luigisag@gmail.com>)
List pgsql-performance
Luigi Saggese <luigisag@gmail.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


pgsql-performance by date:

Previous
From: Steve Singer
Date:
Subject: Re: slow bitmap heap scans on pg 9.2
Next
From: "Thiyagarajan, Palaniappan"
Date:
Subject: PsqL8.3