pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Bad cost estimate with FALSE filter condition
Date: Mon, 16 Mar 2015 14:26:55 -0400
Message-ID: <4345.1426530415@sss.pgh.pa.us> (raw)
In-Reply-To: <55070FC9.4010307@agliodbs.com>
References: <54F119A6.9080106@agliodbs.com>
	<WM!4d936314dc9313889ef2e5e6a4381fd285d187be51c5b5de339e449728769003a8062a9992b607935e468812a6b9b787!@asav-3.01.com>
	<55070FC9.4010307@agliodbs.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Josh Berkus <josh@agliodbs.com> 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



view thread (4+ messages)  latest in thread

Message-ID: <4345.1426530415@sss.pgh.pa.us>
Permalink:  ../4345.1426530415@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4345.1426530415@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com
  Subject: Re: Bad cost estimate with FALSE filter condition
  In-Reply-To: <4345.1426530415@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox