pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Staubo <alex@bengler.no>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Bad plan for nested loop + limit
Date: Mon, 30 Mar 2009 12:24:55 +0100
Message-ID: <88daf38c0903300424s365ef753t52e3d0373131a40d@mail.gmail.com> (raw)
In-Reply-To: <603c8f070902281932w257853e2me25cf567da6a3c46@mail.gmail.com>
References: <88daf38c0902141425s6972d849i9dad904f55d93c77@mail.gmail.com>
	<e7f9235d0902142029h5b53baf2gede92b22afbbad35@mail.gmail.com>
	<88daf38c0902150845y2878fcbfmcd06d426b53a886a@mail.gmail.com>
	<88daf38c0902271218p1931ec9dyfdc269bceab24190@mail.gmail.com>
	<603c8f070902271454h5a78a063kcf2b78a10fd956b1@mail.gmail.com>
	<88daf38c0902280820p745ea234s85efa7f5e58bd0ed@mail.gmail.com>
	<603c8f070902281932w257853e2me25cf567da6a3c46@mail.gmail.com>

On Sun, Mar 1, 2009 at 4:32 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> What do you have default_statistics_target set to?  If it's less than
> 100, you should probably raise it to 100 and re-analyze (the default
> value for 8.4 will be 100, but for 8.3 and prior it is 10).

Changing it to 100 fixed the problem. Thanks for alerting me to the
existence of default_statistics_target.

Alexander.




view thread (8+ messages)

Message-ID: <88daf38c0903300424s365ef753t52e3d0373131a40d@mail.gmail.com>
Permalink:  ../88daf38c0903300424s365ef753t52e3d0373131a40d@mail.gmail.com/
Also on:    postgresql.org/message-id/88daf38c0903300424s365ef753t52e3d0373131a40d@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: alex@bengler.no, robertmhaas@gmail.com
  Subject: Re: Bad plan for nested loop + limit
  In-Reply-To: <88daf38c0903300424s365ef753t52e3d0373131a40d@mail.gmail.com>
  References: <88daf38c0902141425s6972d849i9dad904f55d93c77@mail.gmail.com> <e7f9235d0902142029h5b53baf2gede92b22afbbad35@mail.gmail.com> <88daf38c0902150845y2878fcbfmcd06d426b53a886a@mail.gmail.com> <88daf38c0902271218p1931ec9dyfdc269bceab24190@mail.gmail.com> <603c8f070902271454h5a78a063kcf2b78a10fd956b1@mail.gmail.com> <88daf38c0902280820p745ea234s85efa7f5e58bd0ed@mail.gmail.com> <603c8f070902281932w257853e2me25cf567da6a3c46@mail.gmail.com> <88daf38c0903300424s365ef753t52e3d0373131a40d@mail.gmail.com>

* 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