tuning 11--SQL Statement Tuning

 --《cost based oracle foundamentals》

 

--optimizer_features_enable 
show parameter opti
select * from v$version;
--sql plan management

--diagnostic tools

staspack
explain plan
sql trace and tkprof
sql*plus autotrace feature
oracle sql analyze

--sql reports in staspack
sql ordered by gets  --读取buffer cache 的次数
sql ordered by reads --读取内存中的块到buffer cache的次数
sql ordered by executions  --执行的次数
sql ordered by parse calls --对sql的解析

--what is execution plan


--how to get a execution plan
explain plan
sql trace
automatic workload repository
V$sql_plan
sql*plus autotrace

--uses of execution plan
determing the current execution plan
identifying the effect of indexes
determing access paths
verifying the use of indexes
verifying which execution plan may be used


第44讲:Chapter 11--SQL Statement Tuning

@?/rdbms/admin/utlxplan.sql --创建plan_table 表
explain plan for
select employee_id,last_name,salary  from hr.employees where employee_id=120;


--query plan_table
query plan_table directly
use scrept utlxpls.sql  --@?/rdbms/admin/utlxpls.sql  --格式化输出
use the dbms_xplan package  --select * from table(dbms_xplan.display);


阅读执行计划的要诀:先由上到下,再由里到外

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值