pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesper Krogh <jesper@krogh.cc>
Cc: Bill Martin <bill.martin@communote.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Planner selects different execution plans depending on limit
Date: Thu, 13 Sep 2012 10:54:19 -0400
Message-ID: <26906.1347548059@sss.pgh.pa.us> (raw)
In-Reply-To: <5051F227.7090600@krogh.cc>
References: <D48BF41C96B16442B542F5E25C259047011E80F02A@COM211.communardo.local>
	<5051F227.7090600@krogh.cc>

Jesper Krogh <jesper@krogh.cc> writes:
> On 13/09/12 16:42, Bill Martin wrote:
>> Yes, I've run the ANALYZE command. Regards, Bill Martin 

> The main problem in your case is actually that you dont store the 
> tsvector in the table.

Oh, duh, obviously I lack caffeine this morning.

> If you store to_tsvector('simple',content.content) in a column in
> the database and search against that instead
> then you'll allow PG to garther statistics on the column and make the
> query-planner act according to that.

He can do it without having to change his schema --- but it's the index
column, not the underlying content column, that needs its statistics
target adjusted.

			regards, tom lane




view thread (15+ messages)  latest in thread

Message-ID: <26906.1347548059@sss.pgh.pa.us>
Permalink:  ../26906.1347548059@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26906.1347548059@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, jesper@krogh.cc, bill.martin@communote.com
  Subject: Re: Planner selects different execution plans depending on limit
  In-Reply-To: <26906.1347548059@sss.pgh.pa.us>

* 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