Re: [PERFORM] change sample size for statistics

From: Willy-Bas Loos <willybas(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>, npboley(at)gmail(dot)com
Cc: pgsql-performance(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [PERFORM] change sample size for statistics
Date: 2011-06-13 22:33:59
Message-ID: BANLkTi=vduz6MAaPMWhXVr8Et9dvOv5-pA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Fri, Jun 10, 2011 at 9:58 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> It's not 10%. We use a fixed sample size, which is configurable on the
> system, table, or column basis.
>

It seems that you are referring to "alter column set statistics" and
"default_statistics_target", which are the number of percentiles in the
histogram (and MCV's) .
I mean the number of records that are scanned by analyze to come to the
statistics for the planner, especially n_disctict.

On Fri, Jun 10, 2011 at 10:06 PM, Nathan Boley <npboley(at)gmail(dot)com> wrote:

> If you need to fix ndistinct, a better approach may be to do it manually.
>

That would be nice, but how do i prevent the analyzer to overwrite
n_distinct without blocking the generation of new histogram values etc for
that column?

We use version 8.4 at the moment (on debian squeeze).

Cheers,

WBL
--
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2011-06-13 22:47:37 Re: configure error... please help 9.0.4
Previous Message akp geek 2011-06-13 22:07:51 Re: configure error... please help 9.0.4

Browse pgsql-performance by date

  From Date Subject
Next Message Svetlin Manavski 2011-06-14 13:55:26 need to repeat the same condition on joined tables in order to choose the proper plan
Previous Message Benjamin Krajmalnik 2011-06-12 15:03:18 Re: how much postgres can scale up?