Re: Screwy Statistics... - Mailing list pgsql-general

From Tom Lane
Subject Re: Screwy Statistics...
Date
Msg-id 12610.1031597128@sss.pgh.pa.us
Whole thread Raw
In response to Screwy Statistics...  ("Glen Parker" <glenebob@nwlink.com>)
List pgsql-general
"Glen Parker" <glenebob@nwlink.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

pgsql-general by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: pg_restore not able to restore files larger that 2.4GB
Next
From: Tom Lane
Date:
Subject: 7.3 function permissions (was Re: Making small bits of code available)