关于v$librarycache的几个字段含义

对v$librarycache中的get,pin和reload的含义:
Gets: (Parse) The number of lookups for objects of the namespace
Pins: (Execution) The number of reads or executions of the objects of the namespace
Reloads: (Reparse) The number of library cache misses on the execution step,causing implicit reparsing of the statement and block

lijing回复:
当一个sql语句传给oracle之后,oracle首先要到share pool中找有没有相同的语句存在,如果没有就进行硬解析;
如果有的话就算作是算作是一次get,并查找这条sql语句的执行计划,如果在执行计划已经不存在了或者是存在但不可用,那么就必须对这条sql语句重新进行一个硬解析,这就叫reload,
如果执行计划存在并且可用的话,oracle就执行这句话,这就叫做execution

rwq_ 质疑:
“如果在执行计划已经不存在了或者是存在但不可用,那么就必须对这条sql语句重新进行一个硬解析”这一句值得怀疑:执行计划是在硬解析中生成的吗?


lijing回复:
看看hard parse要做些什么:
the parse step must complete the following tasks:
 1.Check the statement for syntactic correctness.
 2.Perform object resolution where the names and structures of the referenced objects are checked against the data dictionary.
 3.Gather statistics regarding the objects referenced in the query by examining the data dictionary.
 4.Prepare and select an execution plan from among the available plans,including the determination of whether Stored Outlines or Materialized Views are relevant.
 5.Determine the security for the objects referenced in the query by examining the data dictionary.
 6.Generate a compiled version of the statement (calledP-Code).

--摘自Sybex 的《Oracle9i Performance Tuning Study Guide》 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值