Re: SQL statistics

From: Chuck Hamilton <chuckh_at_dvol.com>
Date: 1996/12/02
Message-ID: <32a341c3.1238558_at_n5.gbso.net>#1/1


zlm101_at_psu.edu (Zernan Martinez) wrote:

>Does anybody know how to display statistics on a SQL request?
>I would like to know how Oracle processed my query any hopefully be
>able to optimize my request.
>
>Thanks for any info.
>
>Please respond to zlm101_at_psu.edu
>
>

There are a couple of things you can do. 1. alter session set sql_trace = true

   your_sql_here;
   alter session set sql_trace = false

At this point you can use the tkprof utility against the .trc file generated above and see all sorts of stats on what you'r SQL statement is actually doing.

If you just want to see the execution plan look at "explain plan".

2. If you've got sqlplus 3.3 or higher you can "set autotrace on" and get many of the same results.

--
Chuck Hamilton
chuckh_at_dvol.com

This message delivered by electronic sled dogs. WOOF!
Received on Mon Dec 02 1996 - 00:00:00 CET

Original text of this message