I'll post it if and when I get it. If this is an existing bug I haven't tracked it down yet. If it is new, Oracle hasn't assigned a bug# to it (they are still playing the 'send me your poor, your tired database and I'll see what I can do' game.). Henry > -----Original Message----- > From: Bob Carlin [mailto:smeghead.rimmer@xxxxxxxxx] > Sent: Saturday, November 17, 2007 12:01 PM > To: henry@xxxxxxxxxxxxxxx > Cc: oracle-l@xxxxxxxxxxxxx > Subject: Re: Wrong Results - Bad Execution Plan > > > Henry, > Do you have the bug number for this issue? > > Henry Poras wrote: > > Oracle can, on occasion, generate an execution plan which > returns incorrect > > results. > > > > In our 10.2.0.3 database we have two SQL queries which > should give identical > > result sets, but don't. Outside of a filter which does not > apply, the > > queries are logically identical. They do, however, resolve > to different > > execution plans, one of which is correct and the other > which is WRONG. > > ... > > > > For the "OUTER" query, the execution plan should read > > VIEW > > FILTER > > > > and not > > > > FILTER > > VIEW > > > > This is the bug!!! > > > > The final filter in "OUTER" filters on a.1 for the MAX > clause, not b.1 as is > > correct, since a.1 is the only value for 1 passed through the view. > > Henry > > -- //www.freelists.org/webpage/oracle-l