Re: [SQL] Yet Another (Simple) Case of Index not used - Mailing list pgsql-performance

From Greg Stark
Subject Re: [SQL] Yet Another (Simple) Case of Index not used
Date
Msg-id 87adeh2n06.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: [SQL] Yet Another (Simple) Case of Index not used  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Will LaShell
Date:
Subject: Re: the RAID question, again
Next
From: Frederic Jolliton
Date:
Subject: Important speed difference between a query and a function with the same query