在oracle 10g下,outline(存储大纲)与cursor_sharing参数的依赖关系
来源:互联网 发布:感染病毒源码 编辑:程序博客网 时间:2024/06/06 15:39
在oracle 10g下,outline(存储大纲)与cursor_sharing参数的依赖关系
数据库版本:
10.2.0.1.0
生成无绑定变量的outline:
create outline o1 on
select EMPLOYEE_ID,SALARY from employees where EMPLOYEE_ID=198;
测试outline是否生效(被使用):
ALTER SESSION SET USE_STORED_OUTLINES =true;
select name,sql_text,used from user_outlines;
select EMPLOYEE_ID,SALARY from employees where EMPLOYEE_ID=198;
select name,sql_text,used from user_outlines;
经测试,对于无绑定变量的outline,
只有当cursor_sharing参数被设置为exact,outline才能生效(被使用)。
生成带系统绑定变量的outline:
create outline o2 on
select EMPLOYEE_ID,SALARY from employees where SALARY=:"SYS_B_0";
注:"SYS_B_0"为cursor_sharing参数在similar、force状态下,
系统自动生成的绑定变量。依次为:"SYS_B_0"、"SYS_B_1"等。
测试outline是否生效(被使用):
ALTER SESSION SET USE_STORED_OUTLINES =true;
select name,sql_text,used from user_outlines;
select EMPLOYEE_ID,SALARY from employees where SALARY=5000;
select name,sql_text,used from user_outlines;
经测试,对于带系统绑定变量的outline,
只有cursor_sharing参数被设置成similar或force时,outline才能生效(被使用),
exact会使此存储大纲不能生效。
生成带用户自定义绑定变量的outline:
create outline o3 on
select EMPLOYEE_ID,SALARY from employees where EMPLOYEE_ID=:v1;
测试outline是否生效(被使用):
ALTER SESSION SET USE_STORED_OUTLINES =true;
select name,sql_text,used from user_outlines;
variable v1 number;
exec :v1:=199;
select EMPLOYEE_ID,SALARY from employees where EMPLOYEE_ID=:v1;
select name,sql_text,used from user_outlines;
经测试,对于带用户自定义绑定变量的outline,
无论cursor_sharing参数被设置为何值(exact、similar、force),outline都能生效(被使用)。
数据库版本:
10.2.0.1.0
生成无绑定变量的outline:
create outline o1 on
select EMPLOYEE_ID,SALARY from employees where EMPLOYEE_ID=198;
测试outline是否生效(被使用):
ALTER SESSION SET USE_STORED_OUTLINES =true;
select name,sql_text,used from user_outlines;
select EMPLOYEE_ID,SALARY from employees where EMPLOYEE_ID=198;
select name,sql_text,used from user_outlines;
经测试,对于无绑定变量的outline,
只有当cursor_sharing参数被设置为exact,outline才能生效(被使用)。
生成带系统绑定变量的outline:
create outline o2 on
select EMPLOYEE_ID,SALARY from employees where SALARY=:"SYS_B_0";
注:"SYS_B_0"为cursor_sharing参数在similar、force状态下,
系统自动生成的绑定变量。依次为:"SYS_B_0"、"SYS_B_1"等。
测试outline是否生效(被使用):
ALTER SESSION SET USE_STORED_OUTLINES =true;
select name,sql_text,used from user_outlines;
select EMPLOYEE_ID,SALARY from employees where SALARY=5000;
select name,sql_text,used from user_outlines;
经测试,对于带系统绑定变量的outline,
只有cursor_sharing参数被设置成similar或force时,outline才能生效(被使用),
exact会使此存储大纲不能生效。
生成带用户自定义绑定变量的outline:
create outline o3 on
select EMPLOYEE_ID,SALARY from employees where EMPLOYEE_ID=:v1;
测试outline是否生效(被使用):
ALTER SESSION SET USE_STORED_OUTLINES =true;
select name,sql_text,used from user_outlines;
variable v1 number;
exec :v1:=199;
select EMPLOYEE_ID,SALARY from employees where EMPLOYEE_ID=:v1;
select name,sql_text,used from user_outlines;
经测试,对于带用户自定义绑定变量的outline,
无论cursor_sharing参数被设置为何值(exact、similar、force),outline都能生效(被使用)。
0 0
- 在oracle 10g下,outline(存储大纲)与cursor_sharing参数的依赖关系
- oracle cursor_sharing参数
- Oracle cursor_sharing 参数 详解
- Oracle cursor_sharing 参数 详解
- Oracle cursor_sharing 参数 详解
- Oracle cursor_sharing 参数 详解
- Oracle cursor_sharing 参数 详解
- Oracle cursor_sharing 参数 详解
- Oracle cursor_sharing 参数 详解
- Oracle cursor_sharing 参数 详解
- Oracle cursor_sharing 参数详解
- 11g cursor_sharing 参数说明
- 参数cursor_sharing的值
- oracle 10g中db_recovery_file_dest和log_archive_dest参数的关系
- 柱状图(Histogram),绑定变量,bind peeking,cursor_sharing 之间的关系3 柱状图与cursor_sharing
- ORACLE使用STORED OUTLINE固化执行计划--CURSOR_SHARING
- Oracle初始化参数CURSOR_SHARING详解
- oracle存储提纲(stored outline)
- linux 线程同步机制
- 运营商大数据课件制作内容计划
- Android的网络与通信
- photoshop--PS第一步工具箱2
- 关于如何查询一个期刊是否被SCI或其他机构收录
- 在oracle 10g下,outline(存储大纲)与cursor_sharing参数的依赖关系
- 新疆青年强行闯治安点袭警夺枪 被击伤不治身亡
- CSS: dl,dt,dd,ul,li,ol区别及应用 .
- Objective-C实现常用的4种排序算法
- fzu 1683 纪念SlingShot (矩阵优化递推,递推矩阵求和)
- 在windows系统中安装hadoop
- 学习python的利器-ipython
- 设计模式之抽象工厂
- nginx调优