X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A2D41D1B8E4 for ; Wed, 28 Apr 2004 04:07:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 07145-10 for ; Wed, 28 Apr 2004 04:07:44 -0300 (ADT) Received: from gpdnet.co.uk (gpdnet.plus.com [212.56.100.243]) by svr1.postgresql.org (Postfix) with ESMTP id B4D51D1B8D1 for ; Wed, 28 Apr 2004 04:07:41 -0300 (ADT) Received: from gary (unverified [192.168.1.2]) by gpdnet.co.uk (SurgeMail 1.8g3) with ESMTP id 80 for ; Wed, 28 Apr 2004 08:07:05 +0100 From: "Gary Doades" To: pgsql-performance@postgresql.org Date: Wed, 28 Apr 2004 08:08:03 +0100 MIME-Version: 1.0 Subject: Re: planner/optimizer question Message-ID: <408F6663.22977.CC6AF7D@localhost> In-reply-to: <408F576E.1080504@familyhealth.com.au> References: <408F5ECD.29849.CA91084@localhost> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Server: High Performance Mail Server - http://surgemail.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/475 X-Sequence-Number: 6775 I can understand the performance loss on non-selects for keeping the index validity state tracking the row validity, but would that outweigh the performance gains on selects? Depends on your mix of selects to non selects I guess, but other database systems seem to imply that keeping the index on track is worth it overall. Cheers, Gary. On 28 Apr 2004 at 15:04, Christopher Kings-Lynne wrote: > > Why is there an entry in the index for a row if the row is not valid? > > Wouldn't it be better for the index entry validity to track the row validity. > > If a particular data value for a query (join, where etc.) can be satisfied > > by the index entry itself this would be a big performance gain. > > For SELECTs, yes - but for INSERT, UPDATE and DELETE it would be a big > performance loss. > > Chris >