Re: Query Timings
Date: 1996/01/05
Message-ID: <4cjtlu$61p_at_inet-nntp-gw-1.us.oracle.com>#1/1
In article <30ED5BDC.29F8_at_denitqm.mnet.uswest.com>, Jerry Bull <gbbull_at_denitqm.mnet.uswest.com> writes:
|>We are doing some performance tuning of some SQL statements in a
|>package. We would like to access the timing and other information
|>about these statements, such as CPU time, Disk and Buffered I/O, etc.
|>Is there an easy way to access this information both before and
|>after an individual SQL statement.
|>
|>Thanks.
One way of looking into SQL performance is to use tkprof. I'm not sure if this is what you meant, but...
First, modify your init.ora to include clause and bounce your database: timed_statistics = true
Then you can use timed statistics in tkprof to analyze your SQL statements. - set trace on (this in Oracle7), do your SQL statements and turn trace off
Example: alter session set sql_trace = true <SQL stuff here> alter session set sql_trace = false
- go to the trace directory (defined in init.ora) - look the latest trace file and do
tkprof <tracefile> <outputfile> explain=<username>/<password> You will get explained plan with statistics in your output file.
-- With best regards, Harri ----------------------------------------------------------------------- Oracle Corporation Harri Kaukovuo, Applications Engineer Tel. +1-415-506 3258 500 Oracle Parkway, P.O.Box 659304 Fax +1-415-506 7292 REDWOOD SHORES, CA 94065, USA hkaukovu_at_us.oracle.comReceived on Fri Jan 05 1996 - 00:00:00 CET