易截截图软件、单文件、免安装、纯绿色、仅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表空间操作详解
  1
  2
  3作者:   来源:    更新日期:2006-01-04 
  5
  6 
  7建立表空间
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

oracle update from 问题!

  update t_tmprpt_firstreplycosttime t
set (t.firstreplytime,
t.dealstaff,
t.firstreplyfailcontent)
= (select a.suggesttime,
a.suggester,
substr(a.remark,instr(a.remark,'】',1)+2)
from t_wf_suggesthis a
......

oracle的一些知识小结

Sql中两个“-”表示注释的开始。
拼接运算符:”||”,注意:只有在所有的运算符为null时,拼接的结果是null。
比较运算符用于比较两个值或表达式,给出一个布尔型的结果 true,false,null.
比较运算符:
=
!=  <>   ^=
[not]in 包含
Any some 将一个值与列表中的每个值或者 ......

最简单的一个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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号