Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: CBO & different execution plans

Re: CBO & different execution plans

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 12 Mar 2007 15:16:51 -0700
Message-ID: <1173737811.475724@bubbleator.drizzle.com>


Charles Hooper wrote:
> *
> ERROR at line 1:
> ORA-30394: source statement identical to the destination statement
> ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 29
> ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 185
> ORA-06512: at line 2
>
> It would be nice to use DBMS_ADVANCED_REWRITE to add a hint, such as
> (for the OP):
> /*+ LEADING (HTS_ASSAY HTS_COMPOUND_LOT HTS_ASSAY_RESULT) */
>
> And leave the rest of the SQL statement alone.
>
> Charles Hooper
> PC Support Specialist
> K&M Machine-Fabricating, Inc.

I agree. Maybe you could fool the CBO by making some inconsequential change so that it would see the statement as different. For example:

For example:
WHERE C2+0 = x+0;

Though, of course, that can cause unintended collateral damage.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon Mar 12 2007 - 17:16:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US