niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Oracle » Tools
Explain Plan
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
Author Message
J.O. Aho
*nix forums Guru


Joined: 19 Feb 2005
Posts: 912

PostPosted: Thu Feb 10, 2005 5:21 pm    Post subject: Re: Explain Plan Reply with quote

Or better find some software that helps you to read that execution plan.

Quote:
In *general* you read inside out with the results of the inner operation
providing the input rowset for the outer operation. If you are running
TKPROF with the explain= parameter don't, the plans it gives are those
that would be executed if the statement ran now in the environment as it
is now for the user you use to explain it. The only way to get the plan
that actually was executed is to use the STAT lines (which is what
tkprof does if you don't use explain= ) in the trace file or to query
v$sql_plan if you have that view in the version you are running.
Back to top
DA Morgan
*nix forums Guru


Joined: 06 Mar 2005
Posts: 1042

PostPosted: Sat Feb 05, 2005 12:42 am    Post subject: Re: Explain Plan Reply with quote

amerar@iwc.net wrote:

Quote:
Actually you are wrong. We are using Locally Managed. And again,
there is nothing wrong with the explain plan I displayed.

What I am asking for is how or where I can find info on understand that
hunk of junk.

You've already received it once ... http://tahiti.oracle.com

--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Back to top
Niall Litchfield
*nix forums Guru Wannabe


Joined: 29 Apr 2005
Posts: 128

PostPosted: Fri Feb 04, 2005 8:03 pm    Post subject: Re: Explain Plan Reply with quote

<amerar@iwc.net> wrote in message news:1107548968.828618.55110@l41g2000cwc.googlegroups.com...
Quote:

Actually you are wrong. We are using Locally Managed. And again,
there is nothing wrong with the explain plan I displayed.

What I am asking for is how or where I can find info on understand that
hunk of junk.

Sybrand was correct about the reference manual - the performance tuning guide does tell you about access methods, types of join etc. http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/toc.htm is the reference, you'll see it tells you about access paths and join methods, about explain plan and about tkprof. Its the place to start.

In *general* you read inside out with the results of the inner operation providing the input rowset for the outer operation. If you are running TKPROF with the explain= parameter don't, the plans it gives are those that would be executed if the statement ran now in the environment as it is now for the user you use to explain it. The only way to get the plan that actually was executed is to use the STAT lines (which is what tkprof does if you don't use explain= ) in the trace file or to query v$sql_plan if you have that view in the version you are running.


--
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
Back to top
amerar@iwc.net
*nix forums Guru Wannabe


Joined: 27 Jul 2005
Posts: 185

PostPosted: Fri Feb 04, 2005 7:29 pm    Post subject: Re: Explain Plan Reply with quote

Actually you are wrong. We are using Locally Managed. And again,
there is nothing wrong with the explain plan I displayed.

What I am asking for is how or where I can find info on understand that
hunk of junk.
Back to top
Sybrand Bakker
*nix forums Guru


Joined: 03 Apr 2005
Posts: 1766

PostPosted: Fri Feb 04, 2005 1:36 pm    Post subject: Re: Explain Plan Reply with quote

On 4 Feb 2005 06:06:58 -0800, amerar@iwc.net wrote:

Quote:

Well, this was the output of running some PL/SQL procedure. There is
nothing wrong with this query. What I am getting at, is how would one
interpert all that?

I mean, I'd like to be able to figure out something like: First it did
a full table scan using an index, then it did a sort on those records,
next it joined with table B using columns C & D, then it did a full
table scan without an index on table B.........

Knowing exactly what happened and in what order helps to understand the
path that the query took. I have no clue by looking at this what
happened first, and to what objects and what was done.........that is
what I am trying to accomplish.

Arthur


That is why Oracle published documentation, in your case the
Performanace Tuning manual.
It looks strange you are trying to improve on recursive sql.
Apparently you are also still using Dictionary Managed Tablespaces
(see the reference to fet$ in your explain, fet$ is the table storing
free extents)


--
Sybrand Bakker, Senior Oracle DBA
Back to top
amerar@iwc.net
*nix forums Guru Wannabe


Joined: 27 Jul 2005
Posts: 185

PostPosted: Fri Feb 04, 2005 1:06 pm    Post subject: Re: Explain Plan Reply with quote

Well, this was the output of running some PL/SQL procedure. There is
nothing wrong with this query. What I am getting at, is how would one
interpert all that?

I mean, I'd like to be able to figure out something like: First it did
a full table scan using an index, then it did a sort on those records,
next it joined with table B using columns C & D, then it did a full
table scan without an index on table B.........

Knowing exactly what happened and in what order helps to understand the
path that the query took. I have no clue by looking at this what
happened first, and to what objects and what was done.........that is
what I am trying to accomplish.

Arthur
Back to top
DA Morgan
*nix forums Guru


Joined: 06 Mar 2005
Posts: 1042

PostPosted: Fri Feb 04, 2005 2:10 am    Post subject: Re: Explain Plan Reply with quote

amerar@iwc.net wrote:

Quote:
Hi All,

Ok, so now that I've turned on tracing, generated a trace file, ran
TKPROF and have some output, how the heck an I supposed to interpt
this:

I mean, in plain english, how can I look at my query and know what
exactly happened. I just do not know how to read these.....

I have to do these a lot, so I need to know if there is a method to
understanding all this stuff:

Rows Row Source Operation
------- ---------------------------------------------------
14 MERGE JOIN OUTER
15 VIEW
15 SORT GROUP BY
14 NESTED LOOPS
15 NESTED LOOPS
15 NESTED LOOPS
15 FIXED TABLE FULL X$KCCFE
28 FIXED TABLE FIXED INDEX #1 X$KCCFN
28 FIXED TABLE FULL X$KCCTS
14 FIXED TABLE FIXED INDEX #1 X$KCVFH
9 SORT JOIN
9 VIEW
9 SORT GROUP BY
9 VIEW DBA_FREE_SPACE
9 UNION-ALL
1 NESTED LOOPS
2 NESTED LOOPS
15 INDEX FAST FULL SCAN (object id 39)
15 TABLE ACCESS CLUSTER FET$
28 INDEX UNIQUE SCAN (object id 7)
1 TABLE ACCESS CLUSTER TS$
8 NESTED LOOPS
9 NESTED LOOPS
14 TABLE ACCESS FULL TS$
21 FIXED TABLE FIXED INDEX #1 X$KTFBFE
8 INDEX UNIQUE SCAN (object id 39)

Thanks,

Arthur

First thing I interpret from your explain plan is that you are
querying objects in the data dictionary. Show us your SQL and
the version. As is this is meaningless.

--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Back to top
amerar@iwc.net
*nix forums Guru Wannabe


Joined: 27 Jul 2005
Posts: 185

PostPosted: Thu Feb 03, 2005 9:08 pm    Post subject: Explain Plan Reply with quote

Hi All,

Ok, so now that I've turned on tracing, generated a trace file, ran
TKPROF and have some output, how the heck an I supposed to interpt
this:

I mean, in plain english, how can I look at my query and know what
exactly happened. I just do not know how to read these.....

I have to do these a lot, so I need to know if there is a method to
understanding all this stuff:

Rows Row Source Operation
------- ---------------------------------------------------
14 MERGE JOIN OUTER
15 VIEW
15 SORT GROUP BY
14 NESTED LOOPS
15 NESTED LOOPS
15 NESTED LOOPS
15 FIXED TABLE FULL X$KCCFE
28 FIXED TABLE FIXED INDEX #1 X$KCCFN
28 FIXED TABLE FULL X$KCCTS
14 FIXED TABLE FIXED INDEX #1 X$KCVFH
9 SORT JOIN
9 VIEW
9 SORT GROUP BY
9 VIEW DBA_FREE_SPACE
9 UNION-ALL
1 NESTED LOOPS
2 NESTED LOOPS
15 INDEX FAST FULL SCAN (object id 39)
15 TABLE ACCESS CLUSTER FET$
28 INDEX UNIQUE SCAN (object id 7)
1 TABLE ACCESS CLUSTER TS$
8 NESTED LOOPS
9 NESTED LOOPS
14 TABLE ACCESS FULL TS$
21 FIXED TABLE FIXED INDEX #1 X$KTFBFE
8 INDEX UNIQUE SCAN (object id 39)

Thanks,

Arthur
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 1:11 am | All times are GMT
navigation Forum index » Databases » Oracle » Tools
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Please explain the gin index Kevin Murphy PostgreSQL 0 Tue Jul 18, 2006 2:44 pm
No new posts can someone explain the following sed command? puzzlecracker shell 4 Fri Jul 14, 2006 7:32 pm
No new posts EXPLAIN and Global Temporary Tables dataguy IBM DB2 0 Thu Jul 13, 2006 7:52 pm
No new posts Sun Online account without Service Plan Martin Paul Solaris 5 Wed Jul 12, 2006 12:03 pm
No new posts Wrong select Plan guorke Sybase 0 Wed Jul 12, 2006 10:56 am

Credit Card | Credit Cards | Loans | Vinos tintos | Credit Cards
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.4334s ][ Queries: 20 (0.2981s) ][ GZIP on - Debug on ]