Re: Simple postgresql.conf wizard

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-27 23:40:51
Message-ID: 20081127234051.GB14894@polonium.part.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 27, 2008 at 05:15:04PM -0500, Robert Haas wrote:
> A random thought: maybe the reason I'm not seeing any benefit is
> because my tables are just too small - most contain at most a few
> thousand rows, and some are much smaller. Maybe
> default_statistics_target should vary with the table size? Something
> like, 0.1% of the rows to a maximum of 100... and then 0.01% of the
> rows after that to some higher maximum.... but always a minimum of at
> least 10. I'm guessing that people with really big tables are less
> likely to mind longer planning times and more likely to benefit from
> finding better plans...

Something like this makes an awful lot of sense to me. A higher
statistics target (in theory) better captures the fine details of a
distribution of values; tables with fewer rows are unlikely to
demonstrate fine details (as are tables with categorical, as
opposed to continuous, values). Returning to the original topic of a
configuration creator, perhaps such a tool should ask the user how big
(s)he expects the tables to grow, or perhaps it should be able to
investigate a particular column and recommend a statistics target based
on its distribution, size, etc.

- Josh / eggyknap

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-11-27 23:46:35 Re: Simple postgresql.conf wizard
Previous Message Robert Haas 2008-11-27 22:15:04 Re: Simple postgresql.conf wizard