All other things being equal (and there
are a couple of pages in the performance
tuning guide outlining some things that
are not equal - like joins conditions, indexed
columns, subqueries, user-defined functions
etc.) the 'final' predicates against a single table
are evaluated from the bottom up
Title: RE: Query failing in CBO mode
Okay ... Rule Number 1.
Always convert the data type of the *variable value* to that of table column you are comparing with, and not the other way. The later part causes the problem.
Raj
I have an application query that runs fine in RBO mode but failing in CBO with
ORA-01722: invalid number -
select /*+ rule */ ORDER_NO,ITEM_NO
from [EMAIL PROTECTED]
where ORDER_NO = 4432089
and PROJECT_ORDER = 'Y' and ORDER_STATUS ='O'
ORDER_NO ITEM_NO
--
4432089