X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 87E09475F16 for ; Wed, 23 Apr 2003 12:34:24 -0400 (EDT) Received: from sabre.velocet.net (sabre.velocet.net [216.138.209.205]) by postgresql.org (Postfix) with ESMTP id CC4A3474E42 for ; Wed, 23 Apr 2003 12:34:20 -0400 (EDT) Received: from stark.dyndns.tv (H162.C233.tor.velocet.net [216.138.233.162]) by sabre.velocet.net (Postfix) with ESMTP id C331E138413; Wed, 23 Apr 2003 12:34:17 -0400 (EDT) Received: from localhost ([127.0.0.1] helo=stark.dyndns.tv ident=foobar) by stark.dyndns.tv with smtp (Exim 3.36 #1 (Debian)) id 198NAN-0008NS-00; Wed, 23 Apr 2003 12:32:15 -0400 To: Tom Lane Cc: Kevin Brown , pgsql-performance@postgresql.org Subject: Re: [SQL] Yet Another (Simple) Case of Index not used References: <200304090918.45275.josh@agliodbs.com> <20030419130146.GI1847@filer> <21955.1050767928@sss.pgh.pa.us> <20030420011336.GJ1847@filer> <24735.1050809664@sss.pgh.pa.us> In-Reply-To: <24735.1050809664@sss.pgh.pa.us> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 23 Apr 2003 12:32:09 -0400 Message-ID: <87adeh2n06.fsf@stark.dyndns.tv> Lines: 17 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, hits=-38.8 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_GNUS_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/194 X-Sequence-Number: 1700 Tom Lane 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