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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Explain plan accuracy and bind variables (new thread)

RE: Explain plan accuracy and bind variables (new thread)

From: Khedr, Waleed <Waleed.Khedr_at_FMR.COM>
Date: Fri, 6 Feb 2004 15:29:25 -0500
Message-ID: <D91D9D5A73FC694BBC52F1EB26AD410FA2E49F@MSGBOSCLD2WIN.DMN1.FMR.COM>


sqlplus & explain plan knows nothing about the data types of c1 and n1 and it does not matter if you declare them or not, the explain plan will always work on the assumption they are char fields. You can explain the plan for any bind variables (n1, b1, b100).

If you want it to explain it for numeric field, you need to use: to_number(:b1).

For the trace file, the actual run time stuff get captured.

Regards,

Waleed

-----Original Message-----
From: Cary Millsap [mailto:cary.millsap_at_hotsos.com] Sent: Friday, February 06, 2004 1:08 PM
To: oracle-l_at_freelists.org
Subject: Explain plan accuracy and bind variables (new thread)

Here's the test, shown inline below. The only thing that may slow down your reproducing it is the use of view_trace.sql, which I believe you can download from Steve Adams's www.ixora.com.au <http://www.ixora.com.au/> site. If you can't, it's no big deal; just execute the final step manually.  

If my comments don't match the result of a step in your environment, please let me know.  

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com
Nullius in verba

Upcoming events:
- Performance <http://www.hotsos.com/training/PD101.html> Diagnosis
101: 2/24 San Diego, 3/23 Park City, 4/6 Seattle
- SQL Optimization <http://www.hotsos.com/training/OP101.html> 101:
2/16 Dallas
- Hotsos Symposium 2004 <http://www.hotsos.com/events/symposium/2004> :
March 7-10 Dallas
- Visit www.hotsos.com for schedule details...
 



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Feb 06 2004 - 14:29:25 CST

Original text of this message

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