What IS the cost of a query and what does it mean?

Reference NotesThe formula for the cost (using the CPU Costing Model) of a query is:
Cost = (
#SRds * sreadtime
+ #MRds * mreadtime
+ #CPUCycles / cpuspeed
) / sreadtime

where:
#SRds = number of single block reads
#MRds = number of multi block reads
#CPUCycles = number of CPU Cycles

sreadtim = single block read time
mreadtime = multi block read time
cpuspeed = Standard 'Oracle' CPU cycles per second

The translation of this formula is:

The cost is the time spent on single block reads, plus the time spent on multiblock reads, plus the CPU time required, all divided by the time is takes to do a single block read.

This means that the cost of a query is the PREDICTED EXECUTION TIME, counted innumber of single block read timesand is effectively the unit of measure of the cost.
标签: 暂无标签
oraunix

写了 199 篇文章,拥有财富 1026,被 339 人关注

转播转播 分享分享 分享淘帖
回复

使用道具

成为第一个吐槽的人

您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

意见
反馈