Re: Oracle Trace Analyzer

From: Jonathan Lewis <>
Date: Fri, 4 Jan 2013 07:16:49 -0000
Message-ID: <>

"Mladen Gogala" <> wrote in message
| I've just learned from the author that the venerable TRCA package uses
| just PL/SQL to parse the trace files. That's why it's so slow and
| resource consuming tkprof, orasrp and Cary's Method R profiler. There are
| many parsing good tools but PL/SQL is not one of them. Most of the
| parsing tools use finite automata which require lexer and grammar. Lexer
| identifies the tokens while the grammar part performs the required
| actions with the tokens. The most frequently used parsing tools are lex/
| yacc (flex/bison) and Perl.
| That is why parsing of a 30MB trace file takes 10 minutes with TRCA and
| it takes seconds with tkprof or orasrp.

My memory of versions may be a little hazy, but I think I first saw tkprof in 6.0.27 - then found that it had disappeared in the 6.0.29 upgrade, so I used awk to recreate it. Dead easy if you've got a language that deals with associative arrays, though at the time the concept was so new that no-one was thinking about subtracting resources for recursive SQL from the triggering SQL and all the other clever bits. Then tkprof re-appeared in 6.0.33


Jonathan Lewis

Author: Oracle Core (Apress 2011) Received on Fri Jan 04 2013 - 08:16:49 CET

Original text of this message