Re: [SQL] Yet Another (Simple) Case of Index not used

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Brown <kevin(at)sysexperts(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Date: 2003-04-23 16:32:09
Message-ID: 87adeh2n06.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance pgsql-sql


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hunter Hillegas 2003-04-23 16:46:01 Re: Left Join Not Using Index?
Previous Message Jan Weerts 2003-04-23 16:19:52 Re: another question about connectby from contrib

Browse pgsql-performance by date

  From Date Subject
Next Message Frederic Jolliton 2003-04-23 17:53:55 Important speed difference between a query and a function with the same query
Previous Message Will LaShell 2003-04-22 17:44:48 Re: the RAID question, again

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2003-04-23 17:00:20 Re: Why is seq search preferred here by planner?
Previous Message mallah 2003-04-23 16:21:21 Why is seq search preferred here by planner?