Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: "Elapsed time" from statspack/sql_trace_tkprof_file different;

Re: "Elapsed time" from statspack/sql_trace_tkprof_file different;

From: John Kanagaraj <john.kanagaraj_at_gmail.com>
Date: Fri, 24 Aug 2007 10:15:11 -0700
Message-ID: <2ead3a60708241015v351f4f07u99af335a86006212@mail.gmail.com>


Zhu Chao,

STATSPACK scans V$SQL for high-load SQL based on a certain set of defaulted lower limits, such as on number of logical and physical I/Os per stored SQL statement. Thus, it will capture SQL that occurred prior to, and thus outside of, the snapshot period. If previous executions were faster (or slower), then the V$SQL snapshot does not really paint an accurate picture and your average is screwed. (Snapshot level and threshold information that is used as the lower limits for scanning V$SQL is stored in the STATS$STATSPACK_PARAMETER table. This can be changed using the modify_statspack_parameter procedure.)

In other words, STATSPACK does NOT report the difference in SQL executions as it does with the other V$SYSTEM_EVENT/V$SYSSTAT snapshots. Thus, the whole point of capturing and using V$SQL in STATSPACK is flawed. Have a look at Tim G's scripts on STATSPACK - he has an SQL that can report the difference in executions of a particular SQL that repeats across snapshots, and you will see what I mean...

--

John Kanagaraj <><
DB Soft Inc
http://jkanagaraj.wordpress.com (Sorry - not an Oracle blog!) ** The opinions and facts contained in this message are entirely mine and do not reflect those of my employer or customers **

--

http://www.freelists.org/webpage/oracle-l Received on Fri Aug 24 2007 - 12:15:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US