Re: Query Optimizer does not ignore constant condition?

From: Daniel Roy <danielroy10junk_at_hotmail.com>
Date: 27 Aug 2003 07:17:21 -0700
Message-ID: <3722db.0308270617.71c0519e_at_posting.google.com>


Why can't the DBA help you on getting this info?

> 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 Wed Aug 27 2003 - 16:17:21 CEST

Original text of this message