From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Pflug <Andreas.Pflug@web.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Date: Sun, 20 Apr 2003 11:25:29 -0400
Message-ID: <27004.1050852329@sss.pgh.pa.us> (raw)
In-Reply-To: <3EA27179.6010307@web.de>
References: <EKEBJNAJDPKJBDFGJNIJAENMDBAA.denis@next2me.com>
<200304090918.45275.josh@agliodbs.com>
<20030419130146.GI1847@filer>
<21955.1050767928@sss.pgh.pa.us>
<20030420011336.GJ1847@filer>
<24735.1050809664@sss.pgh.pa.us>
<20030420062852.GK1847@filer>
<3EA27179.6010307@web.de>
Andreas Pflug <Andreas.Pflug@web.de> writes:
> I think a row counter on each table would be even useful for some kind
> of auto-vacuum mechanism, that could be triggered if pg_class.reltuples
> deviates too far from the real row count.
It would be counting the wrong thing. auto-vacuum needs to know how
many dead tuples are in a table, not how many live ones. Example:
UPDATE doesn't change the live-tuple count (without this property,
I don't think the sort of count maintenance Kevin is proposing could
possibly be efficient enough to be interesting). But it does create
a dead tuple that vacuum wants to know about.
regards, tom lane
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: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, Andreas.Pflug@web.de, pgsql-performance@postgresql.org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
In-Reply-To: <27004.1050852329@sss.pgh.pa.us>
* 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