易截截图软件、单文件、免安装、纯绿色、仅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 表信息 整成数据字典

 今天XXX说要把Oracle 里的几张表重新整理下,呵呵 结果阿发现10来张表还真是说多不多说少一点都不少 。因为表里面的commet已经填上了 。偷懒的想法顿时出现嘎嘎
select t.COLUMN_NAME 字段名, t.DATA_TYPE||'('||t.DATA_LENGTH||')' 字段类型,t.NULLABLE 是否为空,t.DATA_DEFAULT 默认值,p.comments 字段说明
fro ......

Oracle:pl/sql 异常处理[转]


pl/sql 提供了强大而灵活的手段来捕捉和处理程序产生的异常,从而使 oracle 的用户远离一些令人烦恼的 bug 。
 
pl/sql 异常处理的概念和术语
 
在 oracle 中所有的错误都被认为是不应该发生的异常。一个异常可能是以下 3 种情况的一种:
u       由系统产生的错误(& ......

Oracle OCI programming and Borland C++ Builder

As you may know, Oracle dropped support for Borland Compilers in OCI
some time back. Well, it isn't all that hard to set up again.
I'm running 9i Release 2 Enterprise Edition on this PC at work and I am
using Borland C++ Builder 6 to 'play' with OCI programming - I intend to
build a set of compo ......

connect by prior 一个很好用的ORACLE递归语句

select t.*, t.rowid from indicators t start with (t.isleaf='1' and t.rid='26020')
connect by prior t.pid = t.id order by t.inum
从叶子节点依据id=pid的关系向上递归到跟节点。
select t.*, t.rowid from indicators t start with (t.pid='0' and t.rid='26020')
connect by prior t.id = t.pid order by t.i ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号