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: Tkprof output question

Re: Tkprof output question

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Fri, 26 Nov 2004 10:31:30 +1100
Message-ID: <41a66b4d$0$20857$afc38c87@news.optusnet.com.au>


Niall Litchfield wrote:
> "wagen" <wagen123_at_yahoo.com> wrote in message
> news:c83c8fbf.0411250847.5183efcf_at_posting.google.com...
>

>>Use explain plan to determine the execution plan.

>
>
>
> I've alluded to this in my other answer.
>
> explain plan (which is what explain= does) determines what the execution
> plan *would be* now. This can be, and sometimes is, different from the
> actual plan that the particular process being traced used. There are of
> course a variety of reasons for this, stats might have changed - the objects
> involved might have changed, the statement might have aged out and is being
> reparsed with different bind variables than the original, session state
> might be different and so on. The bottom line though is that there is only
> one place in which the *actual* execution plan is recorded and that is a
> trace file.

Except in 9i and above, where v$sql_plan will show you the real plan, as it was genuinely parsed and executed, assuming it's still in the Library Cache, of course.

But that's trivia. It's an important point that you make that "explain plan for" shows you what would happen, not what has happened. Thanks for mentioning it.

Regards
HJR Received on Thu Nov 25 2004 - 17:31:30 CST

Original text of this message

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