pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Neil Conway <neilc@samurai.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: raising the default default_statistics_target
Date: Sun, 07 Mar 2004 18:20:51 -0500
Message-ID: <404BAE53.1000709@samurai.com> (raw)
In-Reply-To: <23289.1078700399@sss.pgh.pa.us>
References: <404B9747.4080702@samurai.com>
	<23289.1078700399@sss.pgh.pa.us>

Tom Lane wrote:
> This is something we need to consider, but we'll need more evidence
> before making a choice.  One thing that we have very little data about
> is how much difference it makes in the quality of planner choices.

Right, but is there a practical way to actually get this data?

If the distribution of data in the table is irregular, a higher stats 
target is needed to allow good planning choices. Therefore, the effect 
that the stats target has on planner choices depends on the regularity 
of the distribution of data at installations, and there is no way to 
know that in general AFAICS.

> Also, I would expect that larger stats targets would slow down the parts
> of the planner that look at the stats, since there are more data values
> to examine.  I do not have any numbers about this cost though --- do you
> want to try to get some?

Given the magnitude of the change (25 data elements versus 10), I 
wouldn't expect this to produce a major change in the total runtime of 
the optimizer. However, I don't know the optimizer that well, so I'll 
do some benchmarks when I get a chance.

-Neil



view thread (18+ messages)  latest in thread

Message-ID: <404BAE53.1000709@samurai.com>
Permalink:  ../404BAE53.1000709@samurai.com/
Also on:    postgresql.org/message-id/404BAE53.1000709@samurai.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: neilc@samurai.com, tgl@sss.pgh.pa.us
  Subject: Re: raising the default default_statistics_target
  In-Reply-To: <404BAE53.1000709@samurai.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox