Re: [PATCHES] Better default_statistics_target

From: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>
To: "Gregory Stark" <stark(at)enterprisedb(dot)com>
Cc: Decibel! <decibel(at)decibel(dot)org>, "Christopher Browne" <cbbrowne(at)gmail(dot)com>, "Greg Sabino Mullane" <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] Better default_statistics_target
Date: 2008-01-30 23:36:32
Message-ID: 1d4e0c10801301536n818fac7kd0a05a7060db131e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Jan 31, 2008 12:08 AM, Gregory Stark <stark(at)enterprisedb(dot)com> wrote:
> "Decibel!" <decibel(at)decibel(dot)org> writes:
>
> > I think that before doing any of that you'd be much better off
> > investigating how much performance penalty there is for maxing out
> > default_statistict_target. If, as I suspect, it's essentially 0 on
> > modern hardware, then I don't think it's worth any more effort.
>
> That's not my experience. Even just raising it to 100 multiplies the number of
> rows ANALYZE has to read by 10. And the arrays for every column become ten
> times larger. Eventually they start being toasted...

+1. From the tests I did on our new server, I set the
default_statistict_target to 30. Those tests were mainly based on the
ANALYZE time though, not the planner overhead introduced by larger
statistics - with higher values, I considered the ANALYZE time too
high for the benefits. I set it higher on a per column basis only if I
see it can lead to better stats but from all the tests I did so far,
it was sufficient for our data set.

--
Guillaume

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-01-30 23:50:54 Re: Oops - BF:Mastodon just died
Previous Message Gregory Stark 2008-01-30 23:08:45 Re: [PATCHES] Better default_statistics_target

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-01-31 00:19:53 Re: [PATCHES] Better default_statistics_target
Previous Message Gregory Stark 2008-01-30 23:08:45 Re: [PATCHES] Better default_statistics_target