pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Romuald Brunet <romuald.brunet@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Slower query after psql changed it's execution plan
Date: Mon, 23 Mar 2009 09:20:39 -0500
Message-ID: <49C75467.EE98.0025.0@wicourts.gov> (raw)
In-Reply-To: <8ae589230903230652n294f456dn6e3ec7a39bb4c0aa@mail.gmail.com>
References: <8ae589230903230652n294f456dn6e3ec7a39bb4c0aa@mail.gmail.com>

Romuald Brunet <romuald.brunet@gmail.com> wrote: 
> The statistics are at the default value everywhere (10)
 
Try setting that to 100 and running ANALYZE.
 
The small size of the sample with the default of 10 happened to land
you with a bad estimate this time.  (If the numbers it has were
actually representative of the data, the plan it's using would be
reasonable.)
 
-Kevin



view thread (3+ messages)  latest in thread

Message-ID: <49C75467.EE98.0025.0@wicourts.gov>
Permalink:  ../49C75467.EE98.0025.0@wicourts.gov/
Also on:    postgresql.org/message-id/49C75467.EE98.0025.0@wicourts.gov

 · 

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: Kevin.Grittner@wicourts.gov, romuald.brunet@gmail.com
  Subject: Re: Slower query after psql changed it's execution plan
  In-Reply-To: <49C75467.EE98.0025.0@wicourts.gov>

* 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