【等待事件】User I/O类 等待事件(2.9)--local write wait

SELECTA.*

FROMV$EVENT_NAME A

WHERENAMEIN('local write wait');

造成此等待事件的原因:

1)磁盘损坏

2)若执行TRUNCATE操作很慢,则可能由于表及其表上的索引的初始化值过大,可以通过SQL语句ALTER INDEX IND_BIG_TEMP REBUILD STORAGE (INITIAL 1M);和ALTER TABLE T_BIG MOVE STORAGE (INITIAL 1M);修改其初始化大小

Basically 'local write' wait happens (as the name indicates) when the session is waiting for its local (means writes pending because of its own operation) write operation. This could happen typically if the underlying disc has some serious problems (one of the member disk crash in RAID-05 - for example, or a controller failure). That is why I might have said ' you never see this wait in the normal databases!'. You may see this during (rarely) Truncating a large table while most of the buffers of that table in cache. During TRUNCATEs the session has to a local checkpoint and during this process, the session may wait for'local write' wait. We have not documented this in 'Oracle Wait Interface' as it is very uncommon. May be we can think of adding similar events in the Misc Waits in next edition.翻译下: 基本上'local write wait' 表示会话在等待自己的写操作。在磁盘发生严重问题时会发生(例如RAID 5的一个磁盘崩溃,或者磁盘控制器错误),这在正常的系统中极少发生,在TRUNCATE一个大表而这个表在缓存中的时候,会话必需进行一个local checkpoint,这个时候会话会等待local session wait.在开发环境里面truncate一些列表,速度奇慢。看了一下session等待事件Local Write Wait

local write wait 主要是在dbwr将脏数据写回dbf过程中产生的。

Local write waits 等待说明

网上对local write waits 的说明:

Note 1:

Typically DBWRhas to free up some buffers when you want to read something from the disk.During this process there are chances that you will be waiting for your localbuffer (i.e blocks dirtied/invalidated by your session) to be written to disk.During this time the waits are shown aslocal write waits.

Note 2:

Basically  'localwrite' wait happens (as the name indicates) when the session is waiting for itslocal (means writes pending because of its own operation)  writeoperation. This could happen typically if the underlying disc has some seriousproblems (one of the member disk crash in RAID-05 - for example, or acontroller failure). That is why I might have said ' you never see this wait inthe normal databases!'.You may see thisduring (rarely) Truncating a large table while most of the buffers of thattable in cache. During TRUNCATEs the session has to a local checkpoint andduring this process, the session may wait for 'local write' wait.

基本上'local write' wait 表示会话在等待自己的写操作。在磁盘发生严重问题时会发生(例如RAID 5的一个磁盘崩溃,或者磁盘控制器错误),这在正常的系统中极少发生,在TRUNCATE一个大表而这个表在缓存中的时候,会话必需进行一个localcheckpoint,这个时候会话会等待localsession wait.

在MOS 的文档:

Truncates Taking Too Long... [ID 334822.1]

提到了这个等待事件。

Cause:

Processes thatinvolve temporary tables being truncated and repopulated in multiple,concurrent batch streams may present this situation.

The underlyingproblem is we have to write the object's dirty buffers to disk prior toactually truncating or dropping the object. This ensures instancerecoverability and avoids a stuck recovery. It seems at first glance perfectlyreasonable to simply truncate a temporary table, then repopulate for anotherusage.And then to do the temporary poplulate/truncate operationsin concurrent batches to increase throughput.

However, inreality the concurrent truncates get bogged down as dbwr gets busy flushing thosedirty block buffers from the buffer cache. You will see huge CI enqueue waits.The multiple truncate operations in concurrent streams absolutely killthroughput.This is specially critical with large buffers.

There was also adisscussion in Bug: 4147840 (non-publish) where a peoplesoft process wascausing this behavior because of the above explanation and they seemed to fixit by changing some peoplesoft code to implement delete rather than truncate onsamll temporary tables.

Solution:

In 9.2.0.5 andhigher, it may also help to make sure a "temp" table that isfrequently truncated have storage defined so that it occupies one extent.But this workaround is only available as long as the extent is no morethan 50% the size of the buffer cache. In non-RAC environments the tablestill has to be smaller than 50% of the buffer cache, but it allows thetable to have up to 5 extents before falling back to the old algorithm.

mysql等待事件类型_【等待事件】User I/O类 等待事件(2.9)--local write wait相关推荐

  1. addeventlistener事件参数_从Chrome源码看浏览器的事件机制

    在上一篇<从Chrome源码看浏览器如何构建DOM树>介绍了blink如何创建一棵DOM树,在这一篇将介绍事件机制. 上一篇还有一个地方未提及,那就是在构建完DOM之后,浏览器将会触发DO ...

  2. 连接mysql解决网络抖动_网络抖动时候,获取数据库连接等待15分钟后报错。

    我们的服务器和数据库分布在不同的机房,现象就是每隔一小时左右,获取数据库连接就会等待15分钟后报异常,然后继续获取连接,执行SQL正常.服务器用的是druid1.0.17版本. 有没有可以设置连接超时 ...

  3. mysql中xml类型_使用 SQLXML 数据类型

    使用 SQLXML 数据类型 适用于数据库 XML 类型的 Java 数据类型 Deepak Vohra 2006 年 6 月 10 日发布 概述 J2EE 开发人员通常需要在关系数据库中存储 XML ...

  4. mysql date time类型_数据库datetime是什么类型

    展开全部 datetime类型:可用于需要同时包含日期和时间信息的值. datetime:MySQL 以 'YYYY-MM-DD HH:mm:ss'格式检32313133353236313431303 ...

  5. mysql表的类型_浅谈MySQL表类型

    MySQL为我们提供了很多表类型供选择,有MyISAM.ISAM.HEAP.BerkeleyDB.InnoDB,MERGE表类型,萝卜白菜各有所爱是不假,可是真正选择何种表类型还是要看业务需要啊,每一 ...

  6. mysql 存储xml类型_(MariaDB)MySQL数据类型详解和存储机制

    1.1 数据类型概览 数据类型算是一种字段约束,它限制每个字段能存储什么样的数据.能存储多少数据.能存储的格式等.MySQL/MariaDB大致有5类数据类型,分别是:整形.浮点型.字符串类型.日期时 ...

  7. mysql的索引类型_带您了解mysql索引类型

    MySQL索引的种类繁多,基本分为四类,下面就为您分别介绍MySQL索引,供您参考,希望可以让您对MySQL索引有更深的认识. MySQL索引类型包括: (1)普通索引 这是最基本的索引,它没有任何限 ...

  8. php pdo 支持mysql表类型_全新的PDO数据库操作类php版(仅适用Mysql)

    复制代码 代码如下: /** * 作者:胡睿 * 日期:2012/07/21 * 电邮:hooray0905@foxmail.com */ class HRDB{ protected $pdo; pr ...

  9. mysql经度纬度类型_在MySQL数据库中存储纬度/经度时使用的理想数据类型是什么?...

    Gajus.. 41 取决于您需要的精度. Datatype Bytes resolution ------------------ ----- --------------------------- ...

最新文章

  1. AXI4-Stream协议总结
  2. Hadoop核心架构HDFS+MapReduce+Hbase+Hive内部机理详解
  3. 在c语言中函数的定义变量的值为,变量定义(C语言中变量的声明和定义)
  4. 并发编程——进程——理论知识
  5. 剑道训练很有趣的一种手段
  6. 将矩阵转为一行_LeetCode 力扣官方题解 | 861. 翻转矩阵后的得分
  7. 汇编语言重写除零中断
  8. 关于tornado中session的总结
  9. PPT分享:用户画像场景与技术实现
  10. 让低版本IE兼容H5+CSS3新特性的方法
  11. 【Oracle】闪回技术
  12. java异常处理:finally中不要return
  13. HDU 5427 A problem of sorting 水题
  14. 【服务器代理跨域】---测试网络上一些接口是否可以被调用
  15. 稳压器及稳压二极管型号对照表
  16. express-urlrewrite express url重写
  17. 程序猿崛起2——互联网时代下的新潮流和新活法
  18. 自己动手搭建一个简单的基于Hadoop的离线分析系统之一——网络爬虫
  19. 抖音短视频标题什么样的容易火:国仁楠哥
  20. 计算机怎么搜索特定格式文件,win10 查找指定类型文件方法_win10怎么查找指定类型文件-win7之家...

热门文章

  1. 让程序在崩溃时体面的退出之Unhandled Exception
  2. 免费送礼品裂变引流,利用赠送小礼物线下引流裂变
  3. 后端生成图片验证码,Kotlin生成图片验证码,Java生成图片验证码,图片验证码的生成和校验
  4. C primer plus 学习笔记_第三章 数据和C
  5. 吴恩达推荐深度学习笔记+超详细思维导图!不做学术打工人!
  6. lottie 导出html,lottie系列文章(二):lottie最佳实践
  7. UI设计师需要什么样的美术能力?
  8. docker 入门使用
  9. 线程+线程池【面试题】
  10. android h xh xxh 分辨率,android vector入门