Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YXZjL-0002q9-KL for pgsql-performance@arkaria.postgresql.org; Mon, 16 Mar 2015 18:27:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YXZjL-0008Fw-3s for pgsql-performance@arkaria.postgresql.org; Mon, 16 Mar 2015 18:27:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YXZjK-0008Fl-8w for pgsql-performance@postgresql.org; Mon, 16 Mar 2015 18:27:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YXZjF-0002xn-NL for pgsql-performance@postgresql.org; Mon, 16 Mar 2015 18:27:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t2GIQtAn004346; Mon, 16 Mar 2015 14:26:55 -0400 From: Tom Lane To: Josh Berkus cc: pgsql-performance@postgresql.org Subject: Re: Bad cost estimate with FALSE filter condition In-reply-to: <55070FC9.4010307@agliodbs.com> References: <54F119A6.9080106@agliodbs.com> <55070FC9.4010307@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Mon, 16 Mar 2015 10:15:53 -0700" Date: Mon, 16 Mar 2015 14:26:55 -0400 Message-ID: <4345.1426530415@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Josh Berkus writes: > So ... should I assume my diagnosis is correct? Haven't heard any other > suggestions. I don't see any reason to think this is worth worrying about, or worth spending planner cycles on to produce a cosmetically nicer cost estimate. One-time filters always apply at the top plan level so they're unlikely to change any planner choices. Moreover, for any case other than the not-terribly-interesting constant FALSE case, we're better off assuming that the filter condition will be true (and so there's nothing to adjust). regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance