From: Jeff Boes <jboes@nexcerpt.com>
To: pgsql-admin@postgresql.org
Subject: pg_class.reltuples not reset by VACUUM?
Date: Tue, 08 Apr 2003 13:46:49 -0400
Message-ID: <b6v1p3$cp4$1@news.hub.org> (raw)
I thought that VACUUM ANALYZE would always restore some sense of reality
to the internal statistics for a table. However ...
# select count(*) from job_queue;
count
-------
834
(1 row)
# select reltuples from pg_class where relname = 'job_queue';
reltuples
-----------
206277
(1 row)
# vacuum analyze job_queue;
# select reltuples from pg_class where relname = 'job_queue';
reltuples
-----------
2062xx (slightly larger number)
(1 row)
This is of concern to me mostly because:
# explain select * from job_queue;
NOTICE: QUERY PLAN:
Seq Scan on job_queue (cost=0.00..5989.77 rows=206277 width=95)
Obviously, the optimizer thinks that the table has 200k rows in it!
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jboes@nexcerpt.com
Subject: Re: pg_class.reltuples not reset by VACUUM?
In-Reply-To: <b6v1p3$cp4$1@news.hub.org>
References: <b6v1p3$cp4$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox