动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
电脑书籍下载:程序设计书籍 | 数据库教程书籍 | 平面与多媒体书籍 | 网络通讯书籍 | 系统管理书籍 | 网络安全书籍 | 认证考试书籍
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库学院 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息



本月文章推荐
.32bit oracle 扩展SGA原理.
.Sql*plus技巧之SPOOL应用.
.一个优秀的分析trace文件的脚本.
.Oracle错误案例:ORA-00235.
.ORACLE性能调优原则上篇(列表).
.vsftpd frequently asked questi.
.ORACLE SQL性能优化系列 (十一).
.自己写个 C 程式.
.Function怎么返回一个数据集?.
.用VC开发基于ORACLE数据库方法.
.Oracle Enterprise Manager常见问.
.Oracle优化经典文章------索引原.
.ORACLE神话的破灭.
.linux学习笔记:进程及作业.
.redhat下如何允许root通过telnet.
.用Oracle导入导出工具实现Oracle.
.ExactPapers Oracle 1Z0-026 200.
.如何在Oracle 中实现类似自动增加.
.Java+Oracle应用开发的几个问题.
.一个SQL的优化过程.

ORA FAQ 性能调整系列之——Oracle 9与Oracle 8中CPU_COSTING有什么变化?

发表日期:2008-2-9 |



  
What is the difference between cpu_costing in Oracle 9 and the old costing of Oracle 8 ?
Oracle 9与Oracle 8中CPU_COSTING有什么变化?

Author's name: Jonathan Lewis
Author's Email: Jonathan@jlcomp.demon.co.uk
Date written: 15th Dec 2002

Oracle version(s): 9
What is the difference between cpu_costing in Oracle 9 and the previous costing methods of Oracle 7 and 8 ?
Oracle 9与之前的Oracle 7和8中CPU_COSTING有什么变化?


Oracle 9 introdUCes a more suBTle, and thorough costing mechansim. It's a great improvement on the Oracle 7/8 version, but I think the change-over is going to be a bit like the change-over from rule-based to cost-based. If you don't understand how it works you may see some strange events.
Oracle 9 引入了一套更精细和全面的代价机制。这是对Oracle 7/8版的重大改进,但我认为这一改变类似从基于规则转变至基于代价。假如你不理解它是如何运作的,你会看到希奇的事件。

You can enable cpu_costing simply by collecting system_statistics for an appropriate period of time with the dbms_stats package. This records in the table sys.aux_stats$ values for:
你可以用dbms_stats包收集一段适当的时间内的系统统计,以此来激活CPU_COSTING。

 assumed CPU speed in MHz                       假定的CPU速度(MHz)
 single block read time in milliseconds         单块读时间(ms)
 multiblock read time in milliseconds           多块读时间(ms)
 typical achieved multiblock read.              一般达到的多块读

These figures are used to produce three main effects.
这些数字可产生三个主要效用:

Instead of Oracle assuming that single block reads are just as eXPensive as multiblock reads, Oracle knows the relative speed. This is roughly equivalent to setting the parameter optimizer_index_cost_adj according to the db file xxxx read average wait times - it will encourage Oracle to use indexed Access paths instead of tablescans because Oracle now understands that tablescans are more expensive than it used to think.
Oracle并不假定单块读与多块读一样昂贵,它知道相对速度。这大致与根据数据库文件xxxx读取的平均等待时间设置参数optimizer_index_cost_adj相同——由于Oracle现在认为表扫描比原先理解更昂贵,这将鼓励Oracle使用索引访问路径而不是表扫描。

Secondly, Oracle will use the 'achieved' average multiblock read count to calculate the number of read requests required to scan a table, instead of using an adjusted value of db_file_multiblock_read_count. Since many people use a value of db_file_multiblock_read_count that is inappropriate, the result of this is that Oracle is likely to increase the cost of, and therefore decrease the probability of, doing tablescans (and index fast full scans). Note - the recorded value is used in the calculations, but Oracle tries to use the init.ora value when actually running a tablescan.
其次,Oracle将使用“达到的”(achieved)平均多块读取数来计算扫描一张表所需的读请求数,而不是使用一个db_file_multiblock_read_count的调整值。
由于很多人使用的db_file_multiblock_read_count值并不合适,这样就造成Oracle可能增加表扫描(和索引快速全扫描)的代价,并由此减少表扫描(和索引快速全扫描)的可能性。注重——记录的值是用于计算的,当真正进行扫描时,Oracle会尝试使用init.ora中的值。

Finally, Oracle knows that (e.g.) to_char(date_col) = 'character value' costs a lot more CPU than number_col = number_value, so it may change its choice of index to use a less selective index if the consequential cost of using that index is lower on CPU usage. (Also, Oracle will re-arrange the order of non-access predicates to minimise CPU costs, but the difference in performance from this is not likely to be visible in most cases).
最后,Oracle知道(例如)to_char(日期列)='字符值'的CPU代价比数字列=数值要打,所以Oracle可能修改索引的选择,若使用一个有更小选择性的索引的连续读代价(consequential cost)低于CPU的使用代价,则会选择这一索引。(另外,Oracle将重新安排非访问(non-access)的谓词顺序来减小CPU代价,但在多数情况下不会察觉性能的差异。)

Overall - it's definitely a good thing. In practice, you may see a much stronger bias towards indexed access paths which may impact performance.
总之——这肯定是一个好事。事实上,你可以发现对索引访问路径更强的偏好,这将影响性能。

Further reading: Oracle 9.2 Performance Tuning Guide and Reference
进一步阅读:Oracle 9.2 性能调整指南和参考

--------------------------------------------------------------------------------
本文翻译自http://www.jlcomp.demon.co.uk/faq/  译者仅保留翻译版权

上一篇:Oracle9i(9.2.0.4) Installation Errors Under Redhat 9 人气:462
下一篇:ORACLE中BFILE字段的使用研究 人气:353
浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-7-4 天空网络电影系统SKYUC v2.5.1 B
2008-7-4 PHPDug v2.0 多国语言版
2008-7-4 Drupal v7.x-dev Build 080704
2008-7-4 乐学LBBS无限级目录图片直读系统
2008-7-4 生成静态的美女小偷程序 v1.2
2008-7-4 顶级DJ舞曲网 v1.2 黑色正式版
2008-7-4 生活名片
2008-7-4 轩魂ASP中文验证码
2008-7-4 ip138手机归属地小偷
2008-6-21 PocketTouch简化iPod控制工具 v1
2008-6-21 HidePod万能隐藏 v1.0.9破解版
2008-6-21 TouchPad触摸板破解补丁 v4.42
2008-6-21 iCountDown倒计时工具 v2.0
2008-6-21 tt-Clock语音时钟 v1.0
2008-6-21 PowerManager重启工具
2008-6-21 JasonKit(iLM)离线地图切换软件
2008-6-21 iSlsk P2P下载工具 v0.2.1b
2008-6-21 MCaller来电归属地查询 v0.3破解


  发表评论
姓 名: 验证码:
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報