Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] how to get accurate values in pg_statistic (continued)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mary Edie Meredith <maryedie(at)osdl(dot)org>,pgsql-performance <pgsql-performance(at)postgresql(dot)org>,osdldbt-general <osdldbt-general(at)lists(dot)sourceforge(dot)net>
Subject: Re: [GENERAL] how to get accurate values in pg_statistic (continued)
Date: 2003-09-10 19:44:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Tom Lane wrote:
> Mary Edie Meredith <maryedie(at)osdl(dot)org> writes:
> > Stephan Szabo kindly responded to our earlier queries suggesting we look
> > at default_statistics_target and ALTER TABLE ALTER COLUMN SET
> > 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.

Has there been any progress in determining if the number of default
buckets (10) is the best value?

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to


pgsql-performance by date

Next:From: Bruce MomjianDate: 2003-09-10 20:15:01
Subject: Re: Query too slow
Previous:From: Richard HuxtonDate: 2003-09-10 18:31:53
Subject: Re: Upgrade Woes

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group