Home » RDBMS Server » Performance Tuning » autotrace (autotrace on)  () 1 Vote
autotrace [message #274388] Mon, 15 October 2007 22:41 Go to next message
ashishmcajec
Messages: 20
Registered: April 2007
Location: Mumbai
Junior Member
Hi,
what are the step taken to put the autotrace trace active. and see the plan of the query.?
Re: autotrace [message #274390 is a reply to message #274388] Mon, 15 October 2007 22:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQL> set autotrace
Usage: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
SQL> 
Re: autotrace [message #274393 is a reply to message #274390] Mon, 15 October 2007 22:54 Go to previous messageGo to next message
ashishmcajec
Messages: 20
Registered: April 2007
Location: Mumbai
Junior Member
no how to execute the explain plan there is some package which i have to use it. to run this utility again and again?
Re: autotrace [message #274395 is a reply to message #274388] Mon, 15 October 2007 23:00 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQL> ALTER SESSION SET SQL_TRACE=TRUE;
SQL> ...
SQL> EXIT

then run trace file through TKPROF utility
Re: autotrace [message #274398 is a reply to message #274395] Mon, 15 October 2007 23:07 Go to previous messageGo to next message
ashishmcajec
Messages: 20
Registered: April 2007
Location: Mumbai
Junior Member
Thanks..as one of my friend told me that first we have to run one package in our database and then grant it to every one.
that why i submitted this request...
Re: autotrace [message #274404 is a reply to message #274388] Mon, 15 October 2007 23:24 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Thanks..as one of my friend told me that first we have to run one package in our database and then grant it to every one.
>that why i submitted this request...
What does these 2 lines have to do with generating EXPLAIN PLANS?

You do NOT generate EXPLAIN PLANs for PL/SQL; only for SQL!
Re: autotrace [message #274818 is a reply to message #274388] Wed, 17 October 2007 05:10 Go to previous message
rikfair
Messages: 22
Registered: October 2006
Location: UK
Junior Member
Hi, This article has details on using autotrace and explain plan, including the script you need to run to create the plan table.

http://www.astral-consultancy.co.uk/cgi-bin/hunbug/doco.cgi?11170

Hope this helps.
Previous Topic: Regarding sort optimsation (merged)
Next Topic: Running queries parallely
Goto Forum:
  


Current Time: Tue Jun 25 02:13:40 CDT 2024