Method R Software Discussion Group

For Oracle developers, DBAs, and decision-makers in every phase of the software life cycle.

Discuss Method R products, techniques, and events.

Ask new questions or post your own responses.

Order in which the sql statements were ran in the Profiler

I'm looking at having the order in which the sql statements are executed in the trace in the Profiler.

Cary provided me an .rc file to do it with mrskew.exe which is really cool but having the option to include this information in the Profiler (like the "Profile by SQL Statement" section) would be a great addition in opinion as it would be easier when helping developers to debug and improve their applications.
stephane champoussin Send private email
Thursday, February 09, 2017
 
 
Hi Stephane,

Thank you for your post!

We had considered making this a Profiler option—long ago, in fact—but we decided to implement this feature outside of the Profiler.

One thing we had to consider was that implementing the feature within the Profiler would effectively double the amount of Profiler code path we’d be writing and maintaining. The Profiler’s design, from top to bottom, is 100% dedicated to the goal of focusing the user's attention on the relevant contributors to the duration of the experience explained by the input trace file. Everything in the Profiler is oriented toward this goal.

To sort and regroup the output in another order would make the product a lot more complex. The cost would be out of proportion to the benefit we’d be creating. But cost isn’t the only factor. We feel like it would detract from the single overarching design goal of the tool: again, to focus your attention on the relevant contributors to your experience duration.

As you noted, you can accomplish the goal with the command

    mrskew --rc=calls.rc

(as described in chapter 15 of _The Method R Guide to Mastering Oracle Trace Data, 2nd edition_). The mrskew tool is a nice platform for this, where it’s possible to do some pretty unbelievable things without a lot of effort.

The content of that calls.rc file is below. We will include it in the next release of Method R Workbench.

--group='sprintf("%17.6f %10d %10d %10d %-40.40s %-.46s", $tim, $line, $parse_id, $exec_id, "· "x$dep.$name.(scalar(@bind)?"(".join(",",@bind).")":""), $sql)'
#        12345678901234567 1234567890 1234567890 1234567890 1234567890123456789012345678901234567890 123..
--glabel='          END-TIM      LINE  PARSE-ID    EXEC-ID CALL(BOUND-VALUES)                      STATEMENT-TEXT'
--alldepths --nohistogram --sort=1na --name=:dbcall
Cary Millsap Send private email
Friday, February 17, 2017
 
 
Discussion Groups Main Page

Powered by FogBugz