Re: Simple postgresql.conf wizard - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Simple postgresql.conf wizard
Date
Msg-id 1226614929.27904.434.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Simple postgresql.conf wizard  (Greg Stark <greg.stark@enterprisedb.com>)
Responses Re: Simple postgresql.conf wizard
Re: Simple postgresql.conf wizard
List 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.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Simple postgresql.conf wizard
Next
From: Tom Lane
Date:
Subject: Re: Block-level CRC checks