Direct path read LOB

Table full scan : wait event Direct path read  because of  LOB

"Direct path read" Wait Event During LOB Access (Doc ID 2287482.1)​编辑To Bottom


In this Document

Symptoms
Changes
Cause
Solution
References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

SYMPTOMS

  • High "direct path read" wait events during LOB segment access causes slow application
  • 10046 trace shows LOBREAD before the FETCH operation of the concerned cursor:

    WAIT #0: nam='db file sequential read' ela= 8 file#=1 block#=90222 blocks=1 obj#=98125 tim=6362518869414
    WAIT #0: nam='direct path read' ela= 10 file number=1 first dba=90223 block cnt=1 obj#=98124 tim=6362518869513
    WAIT #0: nam='SQL*Net message to client' ela= 1 driver id=1650815232 #bytes=1 p3=0 obj#=98124 tim=6362518869551
    LOBREAD: type=PERSISTENT LOB,bytes=80,c=13000,e=13885,p=7,cr=88,cu=0,tim=6362518869586
    WAIT #0: nam='SQL*Net message from client' ela= 169 driver id=1650815232 #bytes=1 p3=0 obj#=98124 tim=6362518869798
    FETCH #140413702464064:c=0,e=11,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=897786470,tim=6362518869836

    10046 trace shows the cursor number as 0 for the waits pertaining to LOB (WAIT #0).

    Thus TKPROF output does not show related 'direct path read' wait event reported under the SQL statement section that has made the LOB read,rather it would be reported under 'Overall Totals' section. Also 1 block was read conventionally and the wait event was 'db file sequential read'. This is LOB Index block.

APPLIES TO:

Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

GOAL

There are ways to disable direct path read for SQL statements as follows:

1. event 10949 level 1
2. _serial_direct_read = NEVER

However, there are no direct methods to force the direct path read operations which are faster for some SQL statements.

Sometimes, the same SQL that used to run in direct path read suddenly changed to conventional cache reads causing slow performance.

Goal of this document is to provide a method to force direct path read for such SQL statements.

SOLUTION

There are 2 methods to force direct path reads for SQL statements.

1. Use PARALLEL hint to the SQL statements like, /*+ parallel(4) */ so that parallelism uses direct path read.
2. Setting the statistics of the tables involved in the SQL such that the no.of blocks of tables > _small_table_threshold to enable the serial direct path read.

(i) Check the value of _small_table_threshold parameter in your DB.
SQL> select nam.ksppinm NAME,val.KSPPSTVL VALUE from x$ksppi nam, x$ksppsv val where nam.indx = val.indx and nam.ksppinm = '_small_table_threshold';

(ii) Check the no.of blocks statistics for the table.
SQL> SELECT blocks FROM user_tables WHERE table_name = 'TABLE_NAME';
Example:
If the blocks from user_tables for the object show 100 and _small_table_threshold is set to 480 then set the blocks statistics manually to 1000 so that it would go for direct path read.

(iii) Set the no.of blocks statistics for the tables involved in the SQL manually greater than the "_small_table_threshold" value.
SQL> EXEC DBMS_STATS.SET_TABLE_STATS('username','tabname',numblks=>n);
Example:
SQL> EXEC DBMS_STATS.SET_TABLE_STATS(user,'TEST',numblks=>1000);


There is a parameter _direct_read_decision_statistics_driven that controls this:

NAME                                               VALUE    DESCRIPTION
-------------------------------------------------- -------- ----------------------------------------------------------
_direct_read_decision_statistics_driven            TRUE     enable direct read decision based on optimizer statistics

When the above parameter is FALSE, the direct path read decision is done based on the actual block count of segment header.
When the above parameter is TRUE (default from 11.2.0.2), the direct path read decision is done based on the optimizer statistics.

NOTE: Though the block counts are taken from the optimizer statistics, it is not the optimizer alone that does the direct path read decision, as there are other factors like buffer cache size, cached block counts, PX execution etc affecting the direct path reads.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/30453.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

win11虚拟机安装

win11虚拟机安装 下载虚拟机客户端安装客户端创建虚拟机下载 ISO切换root账号GNOME桌面 下载虚拟机客户端 版本是16.2.3 链接:https://pan.baidu.com/s/13c6XVWFbeQKbCnrlfxD8cA 提取码:qxdc 安装客户端 安装向导 点击下一步 接收条款,点…

爬虫012_字典高级操作_查询_修改_添加_删除和清空_遍历---python工作笔记031

然后来看字典高级,首先 打印某个元素 然后打印的时候注意,如果直接打印的值,在字典中没有就报错 这里要注意不能用点访问

【多维定向滤波器组和表面波】表面变换:用于高效表示多维 s 的多分辨率变换(Matlab代码实现)

💥💥💞💞欢迎来到本博客❤️❤️💥💥 🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。 ⛳️座右铭&a…

Unity 基础函数

Mathf: //1.π-PI print(Mathf.PI); //2.取绝对值-Abs print(Mathf.Abs(-10)); print(Mathf.Abs(-20)); print(Mathf.Abs(1)); //3.向上取整-Ce il To In t float f 1.3f; int i (int)f; …

如何在群辉NAS系统下安装cpolar套件,并使用cpolar内网穿透?

如何在群辉NAS系统下安装cpolar套件,并使用cpolar内网穿透? 文章目录 如何在群辉NAS系统下安装cpolar套件,并使用cpolar内网穿透?前言1. 在群辉NAS系统下安装cpolar套件2. 管理隧道列表3. 创建固定数据隧道 前言 群晖作为大容量存储系统,既可…

bootloader跳转APP注意事项

在gd32f427 时跳转异常 参考文章: https://club.rt-thread.org/ask/question/425321.html%20https:/club.rt-thread.org/ask/question/eab19452583b5959.html https://club.rt-thread.org/ask/question/eab19452583b5959.html 关闭全部中断,并且清除中…

springcloud3 springcloud stream的学习以及案例

一 springcloud stream的作用 1.1 springcloud stream作用 stream屏蔽底层消息中间件的差异,降低切换成本,统一消息的编程模型。 stream中的消息通信模式遵循了“发布-订阅”模式。 1.2 Binder作用 通过定义绑定器Binder作为中间层,实现…

力扣hot100刷题记录

二刷hot100&#xff0c;坚持每天打卡&#xff01;&#xff01;&#xff01;Today&#xff1a;2023-8-10 1. 两数之和 // 先求差&#xff0c;再查哈希表 public int[] twoSum(int[] nums, int target) {Map<Integer,Integer> map new HashMap<>();for(int i 0;i&…

SpringBoot 升级内嵌Tomcat

SpringBoot 更新 Tomcat 最近公司的一个老项目需要升级下Tomcat&#xff0c;由于这个项目我完全没有参与&#xff0c;所以一开始我以为是一个老的Tomcat项目&#xff0c;升级它的Tomcat依赖或者是Tomcat容器镜像&#xff0c;后面发现是一个SpringBoot项目&#xff0c;升级的是…

Dockerfile 简单实战

将flask项目打包成镜像 1. 准备flask文件 创建 app.py 文件&#xff0c;内容如下 from flask import Flask app Flask(__name__)app.route(/) def hello_world():return Hello Worldif __name__ __main__:app.run(host0.0.0.0, port8000, debugTrue) 并开启外网访问&#xf…

vue消息订阅与发布,实现任意组件间通讯

第一步&#xff1a;下载第三方消息订阅与发布库&#xff0c;例如常用的pubsub.js,他可以在任何框架中使用包括vue、react、anglar等等。 命令&#xff1a;npm i pubsub-js 注意是pubsub-js(不是点); 第二步&#xff1a;引入库&#xff1b; import pubsub from pubsub-js 第…

Java并发编程(二)并发理论[JMM/重排序/内存屏障/Happens-Before 规则]

JMM(Java内存模型) 概述 JMM即Java内存模型(Java Memory Model),是一种抽象的概念,并不真实存在,JMM描述的是一组规则或规范,通过这组规范定义了程序中各个变量的访问方式Java内存模型中规定所有变量都存储在主内存,主内存是共享内存区域,所有线程都可以访问,但线程对变量的操…

Android AOSP源码编译——AOSP下载(一)

一、电脑配置 Ubuntu16.04 16G&#xff0c;硬盘的大小最好大于300G (我这边是找了个win电脑装了双系统 没有使用虚拟机的方式) 二、基础环境配置 1、安装git sudo apt install git配置git email和name git config --global user.email "youexample.com" git conf…

数据结构—树和二叉树

5.树和二叉树 5.1树和二叉树的定义 树形结构&#xff08;非线性结构&#xff09;&#xff1a;结点之间有分支&#xff0c;具有层次关系。 5.1.1树的定义 树&#xff08;Tree&#xff09;是n&#xff08;n≥0&#xff09;个结点的有限集。 若n0&#xff0c;称为空树&#x…

LVS工作环境配置

一、LVS-DR工作模式配置 模拟环境如下&#xff1a; 1台客户机 1台LVS负载调度器 2台web服务器 1、环境部署 &#xff08;1&#xff09;LVS负载调度器 yum install -y ipvsadm # 在LVS负载调度器上进行环境安装 ifconfig ens33:200 192.168.134.200/24 # 配置LVS的VIP…

Java自学网站推荐,专业教学快速提升

Java自学网站可以是学习Java的有用资源之一。它们通常提供了丰富的教学材料、在线课程、编程练习和实例项目&#xff0c;帮助初学者系统地学习Java编程语言和相关技术。 动力节点是一家专业的Java培训机构&#xff0c;他们提供在线视频学习平台&#xff0c;你可以参考他们的官方…

数据结构----结构--线性结构--链式存储--链表

数据结构----结构–线性结构–链式存储–链表 1.链表的特点 空间可以不连续&#xff0c;长度不固定&#xff0c;相对于数组灵活自由 搜索&#xff1a; 时间复杂度O(n) 增删: 头增头删时间复杂度O(1) 其他时间复杂度为O(n) 扩展&#xff1a;单向循环链表的特性 从任意节…

Web前端之NodeJS、Vue

文章目录 一、Babel转码器1.1 Babel安装流程1.2 Babel命令行转码 二、Promise对象三、测试方式四、Vue&#xff08;渐进式JS框架&#xff09;4.1 准备4.2 创建一个项目4.3 运行一个项目 五、模板语法5.1 文本5.2 原始html5.3 属性Attribute5.4 使用JavaScript表达式 六、条件渲…

idea常用插件

idea常用插件 1、MyBatis Log Free 打印完整的sql语句 控制台打印的sql语句是需要自己手动补充完整&#xff0c;才能在Navicat中执行。这个插件可以直接帮我们把sql语句完整的打印出来 安装成功后可以直接在控制台右击使用即可 使用效果 2、Maven Helper 解决 maven 依赖冲突…

【LangChain学习】基于PDF文档构建问答知识库(二)创建项目

这里我们使用到 fastapi 作为项目的web框架&#xff0c;它是一个快速&#xff08;高性能&#xff09;的 web 框架&#xff0c;上手简单。 一.创建 FastAPI 项目 我们在IDE中&#xff0c;左侧选择 FastAPI &#xff0c;右侧选择创建一个新的虚拟环境。 创建成功&#xff0c;会有…