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

关于oracle mutex和latch的问题

关于latch和mutex的问题
from:http://www.itpub.net/thread-1004815-1-1.html
A:
latch是闩锁,是一种串行化机制,用来保护SGA中的内存结构。
mutex是什么,也是一种串行化机制,是互斥锁?
个人对mutex没有什么概念。这个是10G新引进的?9I好像没有啊。
哪位明白人,给帮忙详细解释下mutex,最好还能和latch 做下比较。
谢谢。
B:
BTW, things get more fun in 10.2, you can pin cursors without getting library cache pin latch, using KGX mutexes. Mutexes are new in 10.2 and they enable shared access to objects in somewhat similar manner to shared latche; every successful get of a particular mutex will increment its value and a release will decrement. When the count is zero, no one has the mutex and it is safe to get it in exclusive mode. However, they are more fine-grained than kgl latches and provide a better wait mechanism, as far as I understand.
So if your environment supports atomic compare and swap operation (such as CMPXCHG on Intel), you might get away without cursor_space_for_time setting for ultrahigh execution rates. Otherwise the atomic mutex operations would be achieved using the new KGX latches.
At least on my laptop this feature isn't enabled by default (from an OracleWorld paper I remember that it should become default in 10.2.0.2), but so far you can experiment with it if you set _kks_use_mutex_pin = true and bounce the instance (mutex structures will be stored in the shared pool, so you might need to increase shared pool size).
There are also X$MUTEX_SLEEP and X$MUTEX_SLEEP_HISTORY fixed tables that can show some interesting information if you generate some mutex waits into them.
Now, I don't suggest for a moment that you have to understand this response. It is at an extremely deep technical level, and the practical applications of such understanding are probably few and far between. My point, though, is that you must take the time to study and understand Oracle internal operations if you are to have success in Oracle performance optimization. There are no shortc


相关文档:

SQL Server和Oracle的常用函数比较

---------数学函数 ---------------
  1.绝对值
  S:select abs(-1) value
  O:select abs(-1) value from dual
  2.取整(大)
  S:select ceiling(-1.001) value
  O:select ceil(-1.001) value from dual
  3.取整(小)
  S:select floor(-1.001) value
  O:select floor(-1.001) value from ......

java数据库开发中两种注册oracle驱动的方式

一、利用Class.forName函数(用java开发B/S模式的程序) 1.代码如下: //注册驱动程序
public boolean connectDb() {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
return true;
} catch (ClassNotFoundException e) {
System.out.println(e);
return false;
}
} ......

Oracle TRANSLATE用法

语法:TRANSLATE(expr,from,to)
expr: 代表一串字符,from 与 to 是从左到右一一对应的关系,如果不能对应,则视为空值。
举例:
select translate('abcbbaadef','ba','#@') from dual (b将被#替代,a将被@替代)
select translate('abcbbaadef','bad','#@') from dual (b将被#替代,a将被@替代,d对应的值是空 ......

Oracle分析函数参考

首先感谢文章的作者,我转来大家共享
Oracle从8.1.6开始提供分析函数,分析函数用于计算基于组的某种聚合值,它和聚合函数的不同之处是对于每个组返回多行,而聚合函数对于每个组只返回一行。
下面例子中使用的表来自Oracle自带的HR用户下的表,如果没有安装该用户,可以在SYS用户下运行$ORACLE_HOME/demo/schema/human_re ......

Oracle Package中存储过程返回游标

一、Oracle Package的作用
1、定义与说明
  a. 相关对象(自定义类型、函数、存储过程等)的封装
  b. 程序包的各部分
    - 程序包规格说明
          声明子程序
   - 程序包主体
      &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号