X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 90AD79DC876; Tue, 28 Feb 2006 17:02:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 19086-10; Tue, 28 Feb 2006 17:02:51 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 233A69DC869; Tue, 28 Feb 2006 17:02:47 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 66D1B56467; Tue, 28 Feb 2006 15:02:34 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Tue, 28 Feb 2006 15:02:33 -0600 Date: Tue, 28 Feb 2006 15:02:32 -0600 From: "Jim C. Nasby" To: Kevin Grittner Cc: Tom Lane , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org Subject: Re: [PERFORM] temporary indexes Message-ID: <20060228210232.GW82012@pervasive.com> References: <44041B68.EE98.0025.0@wicourts.gov> <16076.1141146348@sss.pgh.pa.us> <440435BC.EE98.0025.0@wicourts.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <440435BC.EE98.0025.0@wicourts.gov> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060228:kevin.grittner@wicourts.gov::eudFjtrvuoIdeqC8:0000000000 0000000000000000000000002tId X-Hashcash: 1:20:060228:tgl@sss.pgh.pa.us::+Qa8IRGERe+gItmt:00000000000000000000 000000000000000000000000ALAs X-Hashcash: 1:20:060228:pgsql-hackers@postgresql.org::L7PIJDnCtWPxm0FV:000000000 0000000000000000000000001Dlu X-Hashcash: 1:20:060228:pgsql-performance@postgresql.org::bX9VFRkio2OM1BOe:00000 00000000000000000000000050tA X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.108 required=5 tests=[AWL=0.108] X-Spam-Score: 0.108 X-Spam-Level: X-Archive-Number: 200602/1238 X-Sequence-Number: 80376 On Tue, Feb 28, 2006 at 11:36:28AM -0600, Kevin Grittner wrote: > > I'm all for that. So far, we've been going after the low-hanging fruit > in our use of PostgreSQL. When we get to the main applications, we're > going to be dealing with a lot more in the way of EXISTS clauses. The > product we're moving from usually optimized an IN test the same as the > logically equivalent EXISTS test, and where a difference existed, it > almost always did better with the EXISTS -- so we encouraged application > programmers to use that form. Also, EXISTS works in situations where > you need to compare on multiple columns, so it is useful in many > situations where EXISTS or MIN/MAX techniques just don't work. > Maybe it's just the way my twisted mind thinks, but I generally prefer using a JOIN when possible... -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461