pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kevin Brown <kevin@sysexperts.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Date: 23 Apr 2003 12:32:09 -0400
Message-ID: <87adeh2n06.fsf@stark.dyndns.tv> (raw)
In-Reply-To: <24735.1050809664@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>


Tom Lane <tgl@sss.pgh.pa.us> writes:

> AFAICS, central-counter techniques could only work in an MVCC system
> if each transaction copies every counter in the system at each snapshot
> freeze point, in case it finds itself needing that counter value later
> on.  This is a huge amount of mostly-useless overhead, and it makes the
> problem of lock contention for access to the counters several orders of
> magnitude worse than you'd first think.

Well, one option would be to do it in a lazy way. If you do an update on a
table with cached aggregate data just throw the data out. This way you get to
cache data on infrequently updated tables and get only a very small penalty on
frequently updated tables.

--
greg




view thread (35+ messages)  latest in thread

Message-ID: <87adeh2n06.fsf@stark.dyndns.tv>
Permalink:  ../87adeh2n06.fsf@stark.dyndns.tv/
Also on:    postgresql.org/message-id/87adeh2n06.fsf@stark.dyndns.tv

 · 

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: gsstark@mit.edu, tgl@sss.pgh.pa.us, kevin@sysexperts.com, pgsql-performance@postgresql.org
  Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
  In-Reply-To: <87adeh2n06.fsf@stark.dyndns.tv>

* 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