4. TKPROF 后的文件解析
因为tkprof 是按照 sort='(prsela,exeela,fchela)'来排序的,所以整个文本排序是以elapsed total时间来进行降序排列的。
因统计耗费的时间时,最小的计量单位为0.01秒,所以如果得到一个阶段中耗费的时间为0,并不表示这个阶段没有耗费时间,而是极可能说明这个阶段耗费的时间小于0.01秒,小于计量单位,数据库无法计时,只要以0.00表示 。
一般来说,elapsed_time = cpu_time + wait_time, 不过对于并行,可能出现cpu_time大于elapsed time的情况。
--- 可以看到 select for update 是作为DML语句来处理的,时间消耗在Execute阶段,fetch阶段为0.
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 0 0.00 0.00 0 0 0 0
Execute 1 56.36 155.93 286124 266551 10087151 0
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 1 56.36 155.93 286124 266551 10087151 0
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/35489/viewspace-1124880/ ,如需转载,请注明出处,否则将追究法律责任。