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

Re: Expected accuracy of planner statistics

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: Arturo Perez <aperez(at)hayesinc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Expected accuracy of planner statistics
Date: 2006-09-29 12:04:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Arturo Perez <aperez(at)hayesinc(dot)com> writes:

> Can the DBA just set n_distinct?  Sometimes s/he just knows what the 
> value should be.

Having an expensive process run once in a while and setting this value also
sounds interesting.  If it has to be calculated every time then this is a bad
thing, but having some kind of command or function to update it that could be
called when the database has a lower load would be interesting.  For companies
that work from 8am to 5pm this could be scheduled to run every night...

> Then, of course, the questions becomes how to keep vacuum et al from 
> messing it up.

It could not touch these setting if the specific command isn't called, it
could gain a new parameter "VACUUM FULL N_DISTINCT ..." to touch it (and then
we probably discard the extra command / function) or it could update these
settings when called with ANALYZE only...  

Jorge Godoy      <jgodoy(at)gmail(dot)com>

In response to


pgsql-general by date

Next:From: Csaba NagyDate: 2006-09-29 12:34:01
Subject: Re: Expected accuracy of planner statistics
Previous:From: Arturo PerezDate: 2006-09-29 11:47:25
Subject: Re: Expected accuracy of planner statistics

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