Tkprof with sort options doesn't work on concatenated file with aggregate=no (Doc ID 744417.1)

Last updated on SEPTEMBER 15, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.8 to 11.1.0.7 - Release: 9.2 to 11.1
Information in this document applies to any platform.

Goal

Suppose you have generated lots of trace files with SQL_TRACE/Event 10046 and
now you want to run tkprof with the sort option against these traces.

To make life easier yo've concatenated all these traces into one big trace file
(for example with the cat command on Unix) and now you run tkprof against the
concatenated file.

As an example take this command line (TEST.trc is the concatenated trace):

tkprof TEST.trc TEST.tkp sort=(exeela,fchela)


This sorts the trace file according to elapsed time executing (=exeela) and
fetched time executing (=fchela) and prints the formatted output to file TEST.tkp.

This is working fine. Note also that this command line uses the default setting for the
aggregate option, i.e. aggregate=yes. With this setting tkprof aggregates multiple users
of the same SQL text.

But suppose you want to sort the concatenated file with aggregate=no, i.e.:

tkprof TEST.trc TEST.tkp aggregate=no sort=(exeela,fchela)


Though it seems to work, when you check TEST.tkp you see the sort options are ignored.

So what went wrong?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms