易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle cursor_sharing参数

先来看看官方文档中对这个参数的解释
CURSOR_SHARING
PropertyDescription
Parameter type
String
Syntax
CURSOR_SHARING = { SIMILAR | EXACT | FORCE }
Default value
EXACT
Modifiable
ALTER SESSION, ALTER SYSTEM
Basic
No
CURSOR_SHARING determines what kind of SQL statements can share the same cursors.
Values:
FORCE
Forces statements that may differ in some literals, but are otherwise identical, to share a cursor, unless the literals affect the meaning of the statement.
SIMILAR
Causes statements that may differ in some literals, but are otherwise identical, to share a cursor, unless the literals affect either the meaning of the statement or the degree to which the plan is optimized.
EXACT
Only allows statements with identical text to share the same cursor.
================================================================================
参数cursor_sharing的解释
--------------------------------------
这个参数的设置,oracle是为了满足一些以前开发的程序,里面有大量的similar statement,但是重写有不现实的情况下使用的一个参数。
并且oracle也不建议使用这个参数。
什么时候需要修改这个参数呢?需要满足以下的条件。
一个是由于大量的shared pool hit miss影响了用户的响应时间(就是当前的shared pool无法满足共享sql语句存储的需要,Alan:当前libary cache中没有我们所需要重用的explain和sql),如果没有这个问题,那么设置这个参数,可能会造成更糟糕的性能。这个参数只会减少parse的时间。
另外一个就是在现有程序中有大量的similar statement,可以通过设置这个参数来获得比较好的性能。
cursor_sharing这个参数有三个值可选,exact、similar、force。当值为exact时为默认值,也是oracle的默认处理方式。就是当一个statement parse的时候,首先到shared pool区查看是否有exact statement存在(就是看是否在shared pool中有和当前要解析的statement完全一样的语句存在),如果不存在,就执行hard parse
如果该参数设置为similar,那么如果在shared pool中无法找到exact statement的存在的时候,就会在shared pool进行一次新的查找,就是查找和当前要解析的语句是否是similar statement的语句。这里需要对similar statement进行解释,simila


相关文档:

最简单的一个Oracle定时任务

最简单的一个Oracle定时任务
一、在PLSQL中创建表:
create table HWQY.TEST
(
CARNO     VARCHAR2(30),
CARINFOID NUMBER
)
二、在PLSQL中创建存储过程:
create or replace procedure pro_test
AS
carinfo_id number;
BEGIN
select s_CarInfoID.nextval into carinfo_id
from dual;
in ......

oracle 中的minus

 minus运算
返回在第一个查询结果中与第二个查询结果不相同的那部分行记录。
有哪些工种在财会部中有,而在销售部中没有?
exp:selectjobfromaccount
minus
selectjobfromsales;
与union相反 ......

ORACLE插入日期数据

 oracle数据库插入日期型数据
往Oracle数据库中插入日期型数据(to_date的用法)
INSERT  INTO  FLOOR  VALUES  ( to_date ( '2007-12-20 18:31:34' , 'YYYY-MM-DD HH24:MI:SS' ) ) ;
查询显示:2007-12-20 18:31:34.0
-------------------
INSERT  INTO  FLOOR  VALUES ......

ORACLE OMF介绍

先看Oracle 官方解释
Oracle managed file (OMF)
A file that is created automatically by the Oracle database server when it is needed and automatically deleted when it is no longer needed.
 
如何判断你的数据库是否为支持OMF
SQL> show parameter db_create_file_dest;
 
NAME  & ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号