explain plan and autotrace [message #342261] |
Thu, 21 August 2008 16:57 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ora1980
Messages: 251 Registered: May 2008
|
Senior Member |
|
|
while explain plan gives the query plan, and gives information
whether out sql is in shared pool,
autotrace also gives the query plan and statistics
so whats the difference? and which one is better to use?
|
|
|
|
|
Re: explain plan and autotrace [message #342757 is a reply to message #342287] |
Sun, 24 August 2008 21:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
Michel Cadot wrote on Fri, 22 August 2008 14:16 | autotrace gives actual statistics
|
Are you certain? The autotrace statistics section contains actuals, but I suspect the explain plan cardinality/bytes etc contains estimates. Haven't verified this - just from observation.
Ross Leishman
|
|
|
Re: explain plan and autotrace [message #342775 is a reply to message #342757] |
Mon, 25 August 2008 01:18 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68678 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
What I meant is the "statistics" part of autotrace, not the statistics in "execution plan" part of it, are real ones.
Actually when you execute "set autotrace on", SQL*Plus starts a new session that gathers statistics of the previous (and executing) one from v$sessstat.
Regards
Michel
|
|
|