Re: Simple postgresql.conf wizard

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, Greg Smith <gsmith(at)gregsmith(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simple postgresql.conf wizard
Date: 2008-11-13 22:22:09
Message-ID: 1226614929.27904.434.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Thu, 2008-11-13 at 20:33 +0100, Greg Stark wrote:

> A statistic target of 400 fir a specific column may make sense but
> even then I would recommend monitoring performance to ensure it
> doesn't cause problems. As a global setting it's, IMHO, ridiculous.
>
> Even for the smaller data types (except boolean and "char") and array
> of 400 will be large enough to be toasted. Planning queries will
> involve many more disk I/Os than some of those queries end up taking
> themselves. Even for stats which are already cached there are some
> algorithms in the planner known to be inefficient for large arrays.
>
> It may make sense for specific skewed columns with indexes on them,
> but keep in mind postgres needs to consult the statistics on any
> column referenced in a qual even if there are no indexes and for most
> data distributions do fine with a target of 10.

Your factual comments are accurate, but for Josh's stated target of Data
Warehousing, a stats target of 400 is not unreasonable in some cases.
What you forget to mention is that sample size is also determined by
stats target and for large databases this can be a more important
consideration than the points you mention.

In any case, saying that somebody is certifiably insane in a public
forum is at best questionable. I would like to see the comment
withdrawn.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-13 22:31:59 Re: Block-level CRC checks
Previous Message Greg Smith 2008-11-13 22:21:09 Re: Simple postgresql.conf wizard