Re: Query Optimizer does not ignore constant condition?
Date: 25 Aug 2003 12:08:17 -0700
Message-ID: <16c83c3f.0308251108.6490ca2f_at_posting.google.com>
Oracle version is 9i.
I don't know how to retrieve the execution plan, optimizer_mode and
the information about when the tables were analyzed. Can you please
tell me how?
I spoke the DBA and he did say something about the optimizer used.
According to him, the rule bases optimizer works better in such cases.
"Queries involving OR conditions can be difficult for the cost-based
optimizer to resolve efficiently. Sometimes (but not always) a
histogram can help. Otherwise, FULL or USE_CONCAT and INDEX hints can
be used to select the best execution plan if OR condition is
mandatory"
But, but....I would consider this particular problem to be, er,
elementary. All these optimizer_mode and table statistics are required
for deciding that ((1=0) or x) is equivalent to (x)? I am surprised.
danielroy10junk_at_hotmail.com (Daniel Roy) wrote in message news:<3722db.0308240959.5f0ca268_at_posting.google.com>...
> Post the execution plans for both cases, and then we'll be able to see
> what's going on. Important data include Oracle version,
> optimizer_mode, tables analyzed recently or not, ...
>
> Daniel
Received on Mon Aug 25 2003 - 21:08:17 CEST