Re: SQL performance - optimizer question

From: <jl34778_at_corp02.d51.lilly.com>
Date: 28 Jan 94 23:28:23 EST
Message-ID: <1994Jan28.232823.1_at_corp02.d51.lilly.com>


I'm coming into this discussion late, so I apologize if this is a stupid question, but I'm confused.

I'm confused with the clause

 	where	(key1 = :key1 or :key1 is null)
 	and	(key2 = :key2 or :key2 is null)
 	and	(key3 = :key3 or :key3 is null);

specifically with the 'or :key1 is null' piece. That 'or' condition does not include any reference to a database object, so I would think that it is either true for all rows or false for all rows, depending on the static value of :key1. I don't see how this would find null values of key1 when :key1 is null.  

-- 
Bob Swisshelm                | swisshelm_at_Lilly.com     | 317 276 5472
Eli Lilly and Company        | Lilly Corporate Center  | Indianapolis, IN 46285
Received on Sat Jan 29 1994 - 05:28:23 CET

Original text of this message