Re: sequential scan unduly favored over text search gin index - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: sequential scan unduly favored over text search gin index
Date
Msg-id 4DFF27C5020000250003E9A4@gw.wicourts.gov
Whole thread Raw
In response to sequential scan unduly favored over text search gin index  (Sushant Sinha <sushant354@gmail.com>)
Responses Re: sequential scan unduly favored over text search gin index
List pgsql-performance
Sushant Sinha <sushant354@gmail.com> wrote:

> I have a tsvector column docvector and a gin index on it
> docmeta1_docvector_idx
>
> I have a simple query "select * from docmeta1 where docvector @@
> plainto_tsquery('english', 'free');"
>
> I find that the planner chooses a sequential scan of the table
> even when the index performs orders of magnitude.

Did you ANALYZE the table after loading the data and building the
index?

-Kevin

pgsql-performance by date:

Previous
From: Sushant Sinha
Date:
Subject: sequential scan unduly favored over text search gin index
Next
From: Jon Nelson
Date:
Subject: bad plan: 8.4.8, hashagg, work_mem=1MB.