tkprof格式化跟踪文件后的内容:
SQL ID: 88tvucq26b37k Plan Hash: 2086140937
Select Object_Id,Object_Name,Object_Type
From
Tab1 Where Object_Id = 2000
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 2 0.00 0.00 0 73 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 4 0.00 0.00 0 8 0 2
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 8 0.00 0.00 0 81 0 2
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 83 (SCOTT)
Number of plan statistics captured: 2
Rows (1st) Rows (avg) Rows (max) Row Source Operation
---------- ---------- ---------- ---------------------------------------------------
1 1 1 TABLE ACCESS BY INDEX ROWID TAB1 (cr=4 pr=0 pw=0 time=50 us cost=2 size=41 card=1)
1 1 1 INDEX RANGE SCAN IND1 (cr=3 pr=0 pw=0 time=107 us cost=1 size=0 card=1)(object id 101626)
insert和records使用示例: sqlplus中执行的脚本
SQL> select user from dual;
USER
------------------------------
SCOTT
SQL> select object_id ,object_name from tab1 where object_id < 20;
OBJECT_ID OBJECT_NAME
---------- ------------------------------
2 C_OBJ#
3 I_OBJ#
4 TAB$
5 CLU$
6 C_TS#
7 I_TS#
8 C_FILE#_BLOCK#
9 I_FILE#_BLOCK#
10 C_USER#
11 I_USER#
12 FET$
OBJECT_ID OBJECT_NAME
---------- ------------------------------
13 UET$
14 SEG$
15 UNDO$
16 TS$
17 FILE$
18 OBJ$
19 IND$
已选择18行。
SQL> select count(*) from tab1;
COUNT(*)
----------
73124
tkprof处理跟踪文件:
[oracle@oadata trace]$ tkprof *_test1.trc test1.txt insert=insert.sql record=record.sql TKPROF: Release 11.2.0.3.0 - Development on 星期四 12月 26 10:10:06 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. [oracle@oadata trace]$ cat insert.sql REM Edit and/or remove the following CREATE TABLE REM statement as your needs dictate. CREATE TABLE tkprof_table ( date_of