http://blog.sina.com.cn/bjrobin2009[订阅]
字体大小: 正文
TKPROF文件解释(2009-07-04 08:48:47)

TKPROF lists the statistics for a SQL statement returned by the SQL Trace facility in rows and columns. Each row corresponds to one of three steps of SQL statement processing. Statistics are identified by the value of the CALL column. See Table 20-3.

Table 20-3 CALL Column Values

CALL Value Meaning

PARSE

Translates the SQL statement into an execution plan, including checks for proper security authorization and checks for the existence of tables, columns, and other referenced objects.翻译sql语句到执行计划,包括适当的安全性检查,并且检查表,字段,其它参考的对象是否存在。

EXECUTE

Actual execution of the statement by Oracle. For INSERT, UPDATE, and DELETE statements, this modifies the data. For SELECT statements, this identifies the selected rows.真正的执行sql语句。对于INSERT, UPDATE, 和DELETE语句,那么会修改数据。对于SELECT语句,确定被选择的行。

FETCH

Retrieves rows returned by a query. Fetches are only performed for SELECT statements.得到查询返回的行。只有SELECT语句才执行这个动作。


The other columns of the SQL Trace facility output are combined statistics for all parses, all executes, and all fetches of a statement. The sum of query and current is the total number of buffers accessed, also called Logical I/Os (LIOs). See Table 20-4.

Table 20-4 SQL Trace Statistics for Parses, Executes, and Fetches.

SQL Trace Statistic Meaning

COUNT

Number of times a statement was parsed, executed, or fetched.语句被解析,执行,和获取的次数

CPU

Total CPU time in seconds for all parse, execute, or fetch calls for the statement. This value is zero (0) if TIMED_STATISTICS is not turned on.解析、执行、获取总的CPU时间(秒)。TIMED_STATISTICS选项如果没有打开,则是0。

ELAPSED

Total elapsed time in seconds for all parse, execute, or fetch calls for the statement. This value is zero (0) if TIMED_STATISTICS is not turned on.解析、执行、获取的总时间(秒)。TIMED_STATISTICS选项如果没有打开,则是0。

DISK

Total number of data blocks physically read from the datafiles on disk for all parse, execute, or fetch calls.解析、执行、获取过程中从硬盘上的数据文件物理读取的数据块的个数。

QUERY

Total number of buffers retrieved in consistent mode for all parse, execute, or fetch calls. Usually, buffers are retrieved in consistent mode for queries.

consistent 方式读取的缓冲区的数量。通常对于查询语句缓冲区是consistent读取的。

CURRENT

Total number of buffers retrieved in current mode. Buffers are retrieved in current mode for statements such as INSERT, UPDATE, and DELETE.

current 模式读取缓冲区的数量。INSERT, UPDATE, and DELETE语句一般式current 模式读取缓冲的。


Statistics about the processed rows appear in the ROWS column. See Table 20-5.

Table 20-5 SQL Trace Statistics for the ROWS Column

SQL Trace Statistic Meaning

ROWS

Total number of rows processed by the SQL statement. This total does not include rows processed by subqueries of the SQL statement.

sql语句处理的总行数。这个总行数不包括子查询处理的行数。


For SELECT statements, the number of rows returned appears for the fetch step. For UPDATE, DELETE, and INSERT statements, the number of rows processed appears for the execute step.

对于SELECT语句,总行数在fetch这一步获得。对于PDATE, DELETE, and INSERT语句,总行数在execute这一步获得。

Note:

The row source counts are displayed when a cursor is closed. In SQL*Plus, there is only one user cursor, so each statement executed causes the previous cursor to be closed; therefore, the row source counts are displayed. PL/SQL has its own cursor handling and does not close child cursors when the parent cursor is closed. Exiting (or reconnecting) causes the counts to be displayed.



参考:http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#PFGRF01020

加载中,请稍候...
  • 评论加载中,请稍候...

验证码:请点击后输入验证码  收听验证码

发评论

以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

相关博文
读取中...
推荐博文
读取中...