Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Explain plan accuracy and bind variables (new thread)
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...
-- 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
![]() |
![]() |