Re: Screwy Statistics...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Glen Parker" <glenebob(at)nwlink(dot)com>
Cc: "Pg-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Screwy Statistics...
Date: 2002-09-09 18:45:28
Message-ID: 12610.1031597128@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Glen Parker" <glenebob(at)nwlink(dot)com> writes:
> First, shouldn't statistics have some clue how many rows might be in the
> table, at least right after an analyze?

Only approximately -- VACUUM or VACUUM ANALYZE will generate an
exact-as-of-the-moment reltuples entry, but just ANALYZE doesn't,
because it doesn't do a complete table scan.

We have an open bug report about ANALYZE's guesstimate sometimes being
further off than one would like. This happens because it estimates
the entire file's tuples-per-page fill factor from that of the first
few pages, and of course that could be radically wrong.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-09-09 19:01:51 Re: Unable to locate type name '? in catalog ERROR
Previous Message Larry Rosenman 2002-09-09 18:26:21 Re: pg_restore not able to restore files larger that 2.4GB