pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Pflug <Andreas.Pflug@web.de>
To: pgsql-performance@postgresql.org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Date: Sun, 20 Apr 2003 12:07:53 +0200
Message-ID: <3EA27179.6010307@web.de> (raw)
In-Reply-To: <20030420062852.GK1847@filer>
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>

Kevin Brown wrote:

>
>No, but an MVCC-managed counter would be useful in such a system,
>wouldn't it?  Or am I missing something there, too (the deltas
>themselves would be managed as described, and would be applied as
>described)?
>
>So: how much contention would there be if the counter were managed in
>exactly the same way as any row of a table is managed?  Because I'm
>not terribly familiar with how PG manages MVCC (pointers to
>documentation on it welcomed) I can't answer that question myself.
>
>  
>
It looks to me that a "row number -1" really would solve this problem.

 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. Observing this mailing list, 
missing or outdated statistics still seem to be a major source of 
performance degradation. We all know these 1000 row estimates from 
EXPLAIN, don't we? A default vacuum strategy for pgsql newbies should 
solve a lot of those problems, preventing a lot of "pgsql is slow" threads.

Regards,
Andreas




view thread (35+ messages)  latest in thread

Message-ID: <3EA27179.6010307@web.de>
Permalink:  ../3EA27179.6010307@web.de/
Also on:    postgresql.org/message-id/3EA27179.6010307@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, pgsql-performance@postgresql.org
  Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
  In-Reply-To: <3EA27179.6010307@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