http://blog.itpub.net/12679300/viewspace-1185623/

db file sequential read及优化

原创 Oracle 作者:wzq609 时间:2014-06-17 22:38:45  16677  0

db file sequential read:顺序读;

官方说明如下:

This event signifies that the user process is reading a buffer into the SGA buffer cache and is waiting for a physical I/O call to return. A sequential read is a single-block read.

Single block I/Os are usually the result of using indexes. Rarely, full table scan calls could get truncated to a single block call because of extent boundaries, or buffers present in the buffer cache. These waits would also show up as db file sequential read.

Check the following V$SESSION_WAIT parameter columns:

?P1: The absolute file number

?P2: The block being read

?P3: The number of blocks (should be 1)

解释:ORACLE进程需要访问block不能从SGA中获取的时候,因此oracle进程会等待block从I/O读取到SGA;

一个顺序读是一个单块读,单块I/O一般来自索引读的结果;

db file sequential read等待事件有3个参数:

?P1: The absolute file number             文件号

?P2: The block being read                first block#

?P3: The number of blocks (should be 1)       block数量

db file sequential read等待时间是由于执行对索引,回滚(undo)段,和表(当借助rowid来访问),控制文件和数据文件头的单块读操作SQL语句(用户和递归)引起的。对于这些对象的物理I/O请求是很正常的,因此db file sequential read等待的存在不是一定意味库或应用出错了。如果会话在这事件上花了好长事件,它可能也不是一个糟糕的事情。相反,如果会话花了大量时间在equeue或latch free上,那么一定是有问题。

问题:AWR报告中的系统的等待事件中的db file sequential read是否合理?

根据awr报告中的以下重要参数进行解读,以11G的awr报告为例子:

说明:db file sequential read是指sga中找不到相应的数据,所以跟buffer hit有很大的关系,当buffer hit命中率太低了,相应的db file sequential read就会高,一般buffer hit保持着95%以上;

查看这个报告的db file sequential read的总时间和平均时间;

Foreground Wait Events也会统计db file sequential read所花费的时间和平均时间

根据SQL User I/O等待时间,查看是否有调优的空间;

db file sequential read的优化方法:

  1. 从读取开始,增加SGA中buffer cache的大小,避免每次都从硬盘中去读数;
  2. 优化sql语句,减少不必要的块读取;

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

本文作者:JOHN

ORACLE技术博客:ORACLE 猎人笔记               数据库技术群:367875324 (请备注ORACLE管理 )

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[转帖] db file sequential read及优化的更多相关文章

  1. Oracle 等待事件 db file sequential read

    db file sequential read-数据文件顺序读取 等待事件: "db file sequential read" Reference Note (文档 ID 345 ...

  2. oracle之 db file sequential read等待事件优化思想

    为什么db file sequential read事件在full table scan操作中显现,为什么在多块读中为什么会有单块读存在 ? extent的大小 :当扩展区中的最后一组块仅是1个块,o ...

  3. Oracle等待事件之db file sequential read/ db file parallel read

    1.产生原因 db file sequential read这个是非常常见的I/O 相关的等待事件.表示发生了与索引扫描相关的等待.意味着I/O 出现了问题,通常表示I/O竞争或者I/O 需求太多. ...

  4. db file sequential read等待事件 --转载

    db file sequential read db file sequential read等待事件有3个参数:file#,first block#,和block数量.在10g中,这等待事件受到用户 ...

  5. db file sequential read (数据文件顺序读取)

    转载:http://www.dbtan.com/2010/04/db-file-sequential-read.html db file sequential read (数据文件顺序读取): db ...

  6. 全表扫描出现db file sequential read

    SESSION 1执行 SQL> update test1 set id=1000; SESSION 2 : select * from test1 如果表上面有大量的行迁链接,会是单块读等待事 ...

  7. 等待事件--db file sequential read

    对于最小化db file sequential read 事件所带来的影响,你可以做的另一件事情是减少AVERAGE_WAIT时间. 这是会话必须等待从磁盘提取单块的平均时间,这些信息可以从v$ses ...

  8. db file sequential read等待事件的一点研究

    db file sequential read等待事件有3个参数:file#,first block#,和block数量. 这个等待事件有3个参数P1,P2,P3, 其中P1代表Oracle要读取的文 ...

  9. 全表扫描引发的db file sequential read

    今天我要做一个SQL调优,监控该SQL, 利用ASH 监控 该SQL是在sid=4848 上面跑的 db file sequential read等待事件有3个参数:file#,first block ...

随机推荐

  1. 洛谷P1523 旅行商简化版(DP)

    题目: P1523 旅行商简化版 解析 可以看做是两个人同时从西往东走,经过不一样的点,走到最东头的方案数 设\(f[i][j]\)表示一个人走到i,一个人走到j的最短距离(\(i<j\)) 第 ...

  2. springmvc上传图片到Tomcat虚拟目录

    一.简介 通过把文件上传到tomcat的虚拟目录,实现代码和资源文件分开. 二.环境 spring+springmvc+mybatis 三.代码实现 1.导入文件上传的jar <dependen ...

  3. div等高布局

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  4. CentOS7 firewalld防火墙规则

    在CentOS7里有几种防火墙共存:firewalld.iptables.ebtables,默认是使用firewalld来管理netfilter子系统,不过底层调用的命令仍然是iptables等. f ...

  5. Django Template语法中 OneToOne、ForeignKey 外键查询

    主表的Models的结构 class A(models.Model): username = models.CharField(max_length=32, verbose_name='用户名称') ...

  6. 使用PSCI机制的SMP启动分析

    其他core的入口 文件:arch/arm64/kernel/head.S secondary_entry: 在从bl31切到EL1上的Linux Kernel后: 第595行,在el2_setup中 ...

  7. SpringBoot 定时任务篇

    一. 基于注解@Scheduled默认为单线程,开启多个任务时,任务的执行时机会受上一个任务执行时间的影响. 1.创建定时器 使用SpringBoot基于注解来创建定时任务非常简单,只需几行代码便可完 ...

  8. django 基础1

    1.web应用 本质是基于socket实现的应用程序 浏览器---------服务器 2.http协议:应用层协议 1.基于TCP协议 2.基于请求响应 3.短连接 4.无状态 请求协议 浏览器--- ...

  9. nginx secure_link_module 访问包含

    server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.acce ...

  10. 01-Eigen的安装

    Ubuntu下: 使用的IDE是Kdevelop.(使用别的也可以) 安装Kdevelop的方法见: http://www.cnblogs.com/alexYuin/p/8989228.html 1. ...