pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mary Edie Meredith <maryedie@osdl.org>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Cc: osdldbt-general <osdldbt-general@lists.sourceforge.net>
Subject: Re: [GENERAL] how to get accurate values in pg_statistic (continued)
Date: Thu, 04 Sep 2003 19:16:15 -0400
Message-ID: <11537.1062717375@sss.pgh.pa.us> (raw)
In-Reply-To: <1062697270.6854.3475.camel@ibm-e.pdx.osdl.net>
References: <1062697270.6854.3475.camel@ibm-e.pdx.osdl.net>

Mary Edie Meredith <maryedie@osdl.org> writes:
> Stephan Szabo kindly responded to our earlier queries suggesting we look
> at default_statistics_target and ALTER TABLE ALTER COLUMN SET
> STATISTICS.  

> These determine the number of bins in the histogram for a given column. 
> But for a large number of rows (for example 6 million) the maximum value
> (1000) does not guarantee that ANALYZE will do a full scan of the table.
> We do not see a way to guarantee the same statistics run to run without
> forcing ANALYZE to examine every row of every table.  

Do you actually still have a problem with the plans changing when the
stats target is above 100 or so?  I think the notion of "force ANALYZE
to do a full scan" is inherently wrongheaded ... it certainly would not
produce numbers that have anything to do with ordinary practice.

If you have data statistics that are so bizarre that the planner still
gets things wrong with a target of 1000, then I'd like to know more
about why.

			regards, tom lane



view thread (22+ messages)  latest in thread

Message-ID: <11537.1062717375@sss.pgh.pa.us>
Permalink:  ../11537.1062717375@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11537.1062717375@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, maryedie@osdl.org, osdldbt-general@lists.sourceforge.net
  Subject: Re: [GENERAL] how to get accurate values in pg_statistic (continued)
  In-Reply-To: <11537.1062717375@sss.pgh.pa.us>
  References: <1062697270.6854.3475.camel@ibm-e.pdx.osdl.net> <11537.1062717375@sss.pgh.pa.us>

* 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