Re: A very long running query....

From: Ioannis Anagnostopoulos <ioannis(at)anatec(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: A very long running query....
Date: 2012-07-20 22:19:15
Message-ID: 5009D963.9040005@anatec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-performance

On 20/07/2012 22:53, Ioannis Anagnostopoulos wrote:
> On 20/07/2012 22:33, Rosser Schwarz wrote:
>> On Fri, Jul 20, 2012 at 2:27 PM, Ioannis Anagnostopoulos
>> <ioannis(at)anatec(dot)com> wrote:
>>> On 20/07/2012 22:23, Claudio Freire wrote:
>>>> Misestimated row counts... did you try running an analyze, or upping
>>>> statistic targets?
>>> I have run analyse every so often. I think the problem is that as I
>>> get 16K
>>> new rows every minutes, the "stats" are always out... Possible?
>> It may not help much with any skew in your data that results from
>> divergent data appearing, but you can update the statistics targets
>> for those columns and analyze again, and the planner should have much
>> better information about the distributions of their data. The max
>> stats target is 10000, but the default is 100. Increasing it even
>> just to 500 or 1000 should help the planner significantly.
>>
>> rls
>>
> I suppose that this is some kind of postgres.conf tweak?
>
On this Ubuntu installation the default_statistics_target = 1000 and not
100. Do you think that this might be an issue?

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2012-07-20 23:10:02 Re: A very long running query....
Previous Message Ioannis Anagnostopoulos 2012-07-20 21:53:46 Re: A very long running query....

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2012-07-20 23:10:02 Re: A very long running query....
Previous Message Ioannis Anagnostopoulos 2012-07-20 21:53:46 Re: A very long running query....