pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sushant Sinha <sushant354@gmail.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-performance@postgresql.org
Subject: Re: sequential scan unduly favored over text search gin index
Date: Mon, 20 Jun 2011 21:34:00 +0530
Message-ID: <1308585840.2488.13.camel@dragflick> (raw)
In-Reply-To: <4DFF27C5020000250003E9A4@gw.wicourts.gov>
References: <1308584339.2488.12.camel@dragflick>
	<4DFF27C5020000250003E9A4@gw.wicourts.gov>


On Mon, 2011-06-20 at 10:58 -0500, Kevin Grittner wrote:
> 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?
Yes and I mentioned that the row estimates are correct, which indicate
that the problem is somewhere else.

-Sushant.
 
> -Kevin





view thread (9+ messages)  latest in thread

Message-ID: <1308585840.2488.13.camel@dragflick>
Permalink:  ../1308585840.2488.13.camel@dragflick/
Also on:    postgresql.org/message-id/1308585840.2488.13.camel@dragflick

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sushant354@gmail.com, Kevin.Grittner@wicourts.gov
  Subject: Re: sequential scan unduly favored over text search gin index
  In-Reply-To: <1308585840.2488.13.camel@dragflick>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox