agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Mike Olson <mao@illustra.com>
To: Paul Brunner <brunner@gdc.com>
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: vacuum command functions
Date: Fri, 08 Jul 94 09:47:25 -0700
Message-ID: <9407081647.AA02144@boulevard.illustra.com> (raw)

brunner@gdc.com (Paul Brunner) writes:

> I was reading a paper comparing university POSTGRES with the database system
> produced by Illustra Software, Inc. (a commercialization of the POSTGRES
> research software.) In the paper, it states that the POSTGRES vacuum command
> never actually updates these statistics. Tests I've run show the attributes
> of "relpages" and "reltuples" being updated by running the vacuum after
> appending rows to classes.

the short answer is that the university system records the number of
tuples and disk pages in a relation.  the commercial system records those
two things, plus some more info about the number of distinct values and
the range of values for each column in a relation.  the additional info
would go into the table 'pg_statistics', if the university system collected
it.

number of tuples and disk pages are useful -- they'll convince the
optimizer to use an index for a scan, if one exists.  however, depending
on the distribution of values in a column, using the index might be a
bad idea.
					mike

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



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: postgres@postgres.berkeley.edu
  Cc: mao@illustra.com, brunner@gdc.com
  Subject: Re: vacuum command functions
  In-Reply-To: <9407081647.AA02144@boulevard.illustra.com>

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

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