Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sort statistics in 8.1.6
Maciej Sobczak <maciej_at_maciejsobczak.com> schreef in berichtnieuws
bc01u1$dug$1_at_SunSITE.icm.edu.pl...
| Hello,
|
| There is a need to find statistics considering sorts using disk, in
| particular:
| - number of merges
| - initial runs
| - etc.
|
| after performing the CREATE INDEX ... PARALLEL (DEGREE 2) statement.
|
| Before running this, the session has:
|
| ALTER SESSION SET EVENTS '10032 TRACE NAME CONTEXT FOREVER, LEVEL 1'
|
| The above was found in some docs, but the trace file formatted by TKPROF
| does not contain the type of info I'm looking for.
|
| Thank you very much for your time,
|
| --
| Maciej Sobczak
| http://www.maciejsobczak.com/
|
SELECT s.sid, n.name, s.value FROM v$sesstat s, v$statname n
WHERE s.statistic# = n.statistic#
AND s.sid = <sid of a session>
AND n.name like '%sort%';
and maybe some other statistics.
Run the query before the session ends.
V$SYSSTAT show the statistics database wide since uptime. V$SESSTAT show the statitstics per session. V$STATNAME describes the statistic numbers and is used to join with v$SESSTAT. Don't write scripts based on the numbers, they can (an do!)change with every version. Received on Sun Jun 08 2003 - 14:30:32 CDT