Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 511559FB576 for ; Fri, 23 Mar 2007 20:04:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 24510-02 for ; Fri, 23 Mar 2007 20:04:45 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by postgresql.org (Postfix) with ESMTP id 5910C9FA59C for ; Fri, 23 Mar 2007 20:04:47 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id x4so2244798nfb for ; Fri, 23 Mar 2007 16:04:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=eVFcCyKmrK7LucXOrD3H8QFOiJSH9I38qoRhZ840Jg/0zwJkm4cQ5f6T3Mi9AodOGTkVRuW8OBEDJ58mdk5T7Xah+WVC4/CV/JQqytQfO+k0922A0v2J3Q5DALmg/BXFT/ynCf2ZOCQlDUnTgYwEOqVvrkuK9qkKgxSJswF9eVE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=R9yncpPjxiwU9+S4wmpOY8gAAoVKQ7ODo8mcX2qD4Ypn13vO90XJNVKYy32HZvG5PkOy+n8AMyYynFJQ8DvhccFGW1aUb+FxLk0B2wEuGVE/8mG0cw70oaQLCLxcwBF7ga+89gpDFWZ96XmSENLgq570n3Dc8UfLHLlKW9cW1ak= Received: by 10.114.25.3 with SMTP id 3mr1441184way.1174691084943; Fri, 23 Mar 2007 16:04:44 -0700 (PDT) Received: by 10.114.154.16 with HTTP; Fri, 23 Mar 2007 16:04:44 -0700 (PDT) Message-ID: Date: Sat, 24 Mar 2007 00:04:44 +0100 From: "Peter Kovacs" To: "Kevin Grittner" Subject: Re: [PERFORM] EXISTS optimization Cc: "Tom Lane" , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org, "Andrea Olson" , "Bill Severson" , "John Hutchins" , "Randy Peterson" , "Shannon Spranger" In-Reply-To: <46040DAC.EE98.0025.0@wicourts.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4603C1A3.EE98.0025.0@wicourts.gov> <25339.1174686582@sss.pgh.pa.us> <46040DAC.EE98.0025.0@wicourts.gov> X-Google-Sender-Auth: 9737aca2c688f264 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/1548 X-Sequence-Number: 101032 On 3/23/07, Kevin Grittner wrote: [...] > That's the good news. The bad news is that I operate under a management portability dictate which doesn't currently allow that syntax, since not all of the products they want to It doesn't really touch the substance, but I am curious: are you not even allowed to discriminate between products in your code like: if db is 'postresql' then ... else ... ? What would be the rationale for that? Thanks Peter cover support it. I tried something which seems equivalent, but it is running for a very long time. I'll show it with just the explain while I wait to see how long the explain analyze takes. > [...]