From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ryan VanMiddlesworth <ryan@vanmiddlesworth.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query planner problem
Date: Sat, 02 Oct 2004 19:21:16 -0400
Message-ID: <26954.1096759276@sss.pgh.pa.us> (raw)
In-Reply-To: <200410011706.54231.ryan@vanmiddlesworth.org>
References: <200410011706.54231.ryan@vanmiddlesworth.org>
Ryan VanMiddlesworth <ryan@vanmiddlesworth.org> writes:
> And here is the query and EXPLAIN from the version that I believe the planner
> should reduce to be logically equivalent:
> SELECT case_id FROM case_data
> WHERE (('2004-09-16' IS NULL) OR (case_filed_date > '2004-09-16'))
> AND (('2004-09-20' IS NULL) OR (case_filed_date < '2004-09-20'))
> I was hoping that the null comparisons would get folded out by the planner
> relatively cheaply.
You could teach eval_const_expressions about simplifying NullTest nodes
if you think it's important enough.
regards, tom lane
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, ryan@vanmiddlesworth.org
Subject: Re: Query planner problem
In-Reply-To: <26954.1096759276@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