Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id D61A79FB2E6 for ; Tue, 24 Oct 2006 06:29:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 28389-07 for ; Tue, 24 Oct 2006 09:29:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 1E3CC9FB2B4 for ; Tue, 24 Oct 2006 06:29:40 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (84-72-188-217.dclient.hispeed.ch [84.72.188.217]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id D543765995 for ; Tue, 24 Oct 2006 11:32:13 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 83662184B9024 for ; Tue, 24 Oct 2006 11:29:37 +0200 (CEST) Message-ID: <453DDD00.3000503@logix-tt.com> Date: Tue, 24 Oct 2006 11:29:36 +0200 From: Markus Schaber Reply-To: PostgreSQL Performance List Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.7 (X11/20060927) MIME-Version: 1.0 To: PostgreSQL Performance List Subject: Re: Index on two columns not used References: <45360E25.9010403@freesurf.fr> <45361295.9050504@enterprisedb.com> <4539F4E1.7000003@chemaxon.hu> <453CC2DD.4070608@logix-tt.com> <20061023135011.GG7961@alvh.no-ip.org> <453CDCF2.6090208@logix-tt.com> <24757.1161619301@sss.pgh.pa.us> In-Reply-To: <24757.1161619301@sss.pgh.pa.us> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/499 X-Sequence-Number: 21628 Hi, Tom, Tom Lane wrote: > You're wrong. An UPDATE always writes a new version of the row (if it > overwrote the row in-place, it wouldn't be rollback-able). The new > version has a different TID and therefore the index entry must change. > To support MVCC, our approach is to always insert a new index entry > pointing at the new TID --- the old one remains in place so that the old > version can still be found by transactions that need it. OK, good you corrected me. I had the weird impression that both row versions have the same tuple ID (as they are different versions of the same tuple), and so an index change is not necessary when both versions fit on the same page. Thanks, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org