While I was examining with tkprof, I noticed that there are 2 undocumented parameters (Oracle 11gR2): verbose and diag. Let’s take a look at them.
Verbose: If you set verbose=y, tkprof will provide some extra information on output files. It adds “SQL Text addres(s)” and “SQL Text Hash Value” lines for each query:
SQL ID: 3g7sxtj9d6zd3 Plan Hash: 742841275 select privilege#,nvl(col#,0),max(mod(nvl(option$,0),2)) from objauth$ where obj#=:1 and grantee#=:2 group by privilege#,nvl(col#,0) call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.00 0 0 0 0 Execute 3 0.00 0.00 0 0 0 0 Fetch 6 0.00 0.00 0 9 0 3 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 10 0.00 0.00 0 9 0 3 Misses in library cache during parse: 1 Misses in library cache during execute: 1 Optimizer mode: CHOOSE SQL Text addres: 7dea7d18 SQL Text Hash Value: 1389591971 Parsing user id: SYS (recursive depth: 2) Number of plan statistics captured: 1 Rows (1st) Rows (avg) Rows (max) Row Source Operation ---------- ---------- ---------- ---------------------------------------------- 1 1 1 SORT GROUP BY (cr=3 pr=0 pw=0 ...
It also adds a summary part to the end of the output file:
Oracle command counts: create table 23 insert 14 select 185 update 17 delete 53 create sequence 3 create view 1 create procedure 2 alter procedure 2 alter session 64 commit 1 pl/sql execute 26 Oracle commands with error during parse: None found.
Diag: This parameter expects you to give a file name. Tkprof can produce internal diagnostics information which seems only meaningful for Tkprof developers. Sample output of a tkprof diagnostic file:
Sizeof() info: kvpfctx: 3008, kvpfcrs: 368, kvpfsql: 192 kvpfvid: 112, kvpfvxp: 52, kvpfxpl: 56, kvpfpln: 56 kvpfehdr: 24, kvpfehtbl: 360, kvpfomn: 32, kvpfmsg: 312 kvpfoctname: 808, kvpfstnames: 256, kvpfdsb: 56 kvpfusr: 16 kvpfsql: 104, kvpfrws: 0 *** SESSION ID:(51.505) 2014-09-22 15:46:41.965 cursor: 0, dep: 0, seq: 0 prevcur: 0, prevdep: 0 newcur: 1, dep: 1, seq: 1, type: 1 cursor: 1, dep: 1, seq: 1 prevcur: 0, prevdep: 0 newcur: 1, dep: 1, seq: 2, type: 3