了解 tkprof 生成的跟踪文件
大家好,我正在学习 Oracle 10g 的查询优化,但在理解下面的文件时遇到了一些困难。 有人可以解释一下下面的文件吗,它是我运行的查询的跟踪文件。 我知道 CPU 和运行时间是多少(查询从数据库获取数据所需的时间) 但不确定“磁盘”和“查询”。
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- -------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 9001 0.17 0.15 1812 16205 0 134999
------- ------ -------- ---------- ---------- ---------- ---------- -------
total 9003 0.17 0.15 1812 16205 0 134999
hey guys i am learning query optimization with oracle 10g, and having some trouble understanding the file below.
could some anyone please explain the file below, its a trace file of query i ran.
i know what CPU and elapsed time is (time a query takes to fetch data from database)
but unsure about "disk" and "query".
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- -------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 9001 0.17 0.15 1812 16205 0 134999
------- ------ -------- ---------- ---------- ---------- ---------- -------
total 9003 0.17 0.15 1812 16205 0 134999
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我过去写过一篇关于此的文章 - 如果您刚开始,这可能对您有用:
http://betteracle.com/posts/14-sql-trace-and-tkprof
在 tkprof 输出中,DISK 列指示从磁盘读取了多少块,相当于自动跟踪输出中的物理读取。
QUERY 列是回答查询所需的逻辑 I/O 操作的数量,这些操作可能来自缓冲区高速缓存或磁盘。这相当于自动跟踪中的 CONSISTENT GETS 统计信息。
CURRENT 列表示当前模式下获取的块数,通常需要更新。
I have written an article about this in the past - if you are starting out this may be useful to you:
http://betteratoracle.com/posts/14-sql-trace-and-tkprof
In the tkprof output, the DISK column indicates how many blocks were read from disk, and is equivalent to PHYSICAL READS in the autotrace output.
The QUERY column is the number of logical I/O operations required to answer the query, which may have come from the buffer cache or disk. This is equivalent to the CONSISTENT GETS stat in autotrace.
The CURRENT column indicates the number of blocks gotten in current mode, and are usually required for updates.