Re: sequential scan unduly favored over text search gin index

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <sushant354(at)gmail(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: sequential scan unduly favored over text search gin index
Date: 2011-06-20 15:58:13
Message-ID: 4DFF27C5020000250003E9A4@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Sushant Sinha <sushant354(at)gmail(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Sushant Sinha 2011-06-20 16:04:00 Re: sequential scan unduly favored over text search gin index
Previous Message Jon Nelson 2011-06-20 15:53:52 bad plan: 8.4.8, hashagg, work_mem=1MB.