Re: Bad plan for nested loop + limit

From: Alexander Staubo <alex(at)bengler(dot)no>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Bad plan for nested loop + limit
Date: 2009-03-30 11:24:55
Message-ID: 88daf38c0903300424s365ef753t52e3d0373131a40d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, Mar 1, 2009 at 4:32 AM, Robert Haas <robertmhaas(at)gmail(dot)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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mario Splivalo 2009-03-30 14:07:51 Forcing seq_scan off for large table joined with tiny table yeilds improved performance
Previous Message Matthew Wakeling 2009-03-30 10:26:03 Re: Very specialised query