pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Pflug <Andreas.Pflug@web.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-performance@postgresql.org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Date: Sun, 20 Apr 2003 17:37:57 +0200
Message-ID: <3EA2BED5.9010707@web.de> (raw)
In-Reply-To: <27004.1050852329@sss.pgh.pa.us>
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>
	<27004.1050852329@sss.pgh.pa.us>

Tom Lane wrote:

>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.
>
>  
>
I understand your point, but is this about VACUUM only or VACUUM ANALYZE 
too? People wouldn't bother about big databases if it's still fast 
(until the disk is full :-)

Do dead tuples affect query planning? I thought the plan only cares 
about existing rows and their data patterns.
So count(*), pg_stat_all_tables.n_tup_ins, .n_tup_upd and .n_tup_del all 
together can make a VACUUM ANALYZE necessary, right?

Regards,
Andreas




view thread (35+ messages)  latest in thread

Message-ID: <3EA2BED5.9010707@web.de>
Permalink:  ../3EA2BED5.9010707@web.de/
Also on:    postgresql.org/message-id/3EA2BED5.9010707@web.de

 · 

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: pgsql-sql@postgresql.org
  Cc: Andreas.Pflug@web.de, tgl@sss.pgh.pa.us, pgsql-performance@postgresql.org
  Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
  In-Reply-To: <3EA2BED5.9010707@web.de>

* 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