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

Home -> Community -> Mailing Lists -> Oracle-L -> SQL Trace ( Perl script help needed)

SQL Trace ( Perl script help needed)

From: Valiveru, Siva <SValiveru_at_ea.com>
Date: Mon, 18 Jun 2001 15:22:24 -0700
Message-ID: <F001.0032DEA7.20010618153044@fatcity.com>

Hello Gurus,

I was trying to pull distinct sql's and their total "execute count" from a bunch of 250 trace output files(output from tkprof trace files). How can I achive this. What i need the cumulative sum of execute count from different files for each sql's.

As u all know sql can extend more than one line so ! I know this can be handled using perl script.

file1.prf
..
select * from tablename1
where col1=:1
and col2=:2

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ----------



Parse 5 0.00 0.00 0 0 0 0
Execute 5 0.02 0.02 0 600 0 0
Fetch 5 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ----------

total 15 0.02 0.02 0 600 0 0
....

select * from tablename2
where col1=:1
and col2=:2

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ----------



Parse 5 0.00 0.00 0 0 0 0
Execute 5 0.02 0.02 0 600 0 0
Fetch 5 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ----------

total 15 0.02 0.02 0 600 0 0

file2.prf

select * from tablename1
where col1=:1
and col2=:2

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ----------



Parse 5 0.00 0.00 0 0 0 0
Execute 5 0.02 0.02 0 600 0 0
Fetch 5 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ----------

total 15 0.02 0.02 0 600 0 0

select * from tablename3
where col1=:1
and col2=:2

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ----------



Parse 5 0.00 0.00 0 0 0 0
Execute 5 0.02 0.02 0 600 0 0
Fetch 5 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ----------

total 15 0.02 0.02 0 600 0 0
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Valiveru, Siva
  INET: SValiveru_at_ea.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Mon Jun 18 2001 - 17:22:24 CDT

Original text of this message

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