Home  >  Article  >  Database  >  理解redo(9)10g R2后oracle对redo写的增强

理解redo(9)10g R2后oracle对redo写的增强

WBOY
WBOYOriginal
2016-06-07 17:58:20873browse

10G R2后,Oracle提供了一个新参数commit_write来控制客户端commit后,ORACLE写日志的行为。这个参数值有四种组合。 immediate , wait 注释:Server process在提交时使用semctl发送信号给LGWR,通知其Flush Log Buffer,并等待LGWR发回的消息(semtimedop). LGWR

10G R2后,Oracle提供了一个新参数commit_write来控制客户端commit后,ORACLE写日志的行为。这个参数值有四种组合。

·  immediate , wait

注释:Server process在提交时使用semctl发送信号给LGWR,通知其Flush Log Buffer,并等待LGWR发回的消息(semtimedop).

LGWR在接收到消息后, Flush log buffer到磁盘,通过semctl发送信号给Server Process,告知其commit成功.

·  immediate , nowait

·  batch , wait

注释:Server Process在提交时使用semctl发送信号给LGWR,要求其提交后通知此Server Process进程,并等待此消息返回(运行semtmdop)

LGWR在经过一定的内部时间(Timeout)后, Flush Log Buffer到磁盘,并使用semctl通知此Server Process进程

·  batch , nowait

传统的,我们的默认写方式都是immediate , wait。代表server process立即通知LGWR刷新日志,LGWR刷新完log buffer后通知server process,COMMIT成功。

如果用了nowait选项,your session doesn’t send a message to lgwr at all。不管是batch,还是immediate,在指定nowait时候,事务都是在in the near future进行提交,

而不是立即提交。因为,由下图可知:Immediate nowait和Batch nowait的redo synch writes次数都是0,即没有立即进行日志写。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:SQL 实用语句Next article:Oracle中Decode()函数使用说明