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,一经查实,立即删除!

相关文章

QT读写配置文件

文章目录 一、概述二、使用步骤1.引入头文件2.头文件的public中定义配置文件对象3.初始化 一、概述 Qt中常见的配置文件为(.ini)文件,其中ini是Initialization File的缩写,即初始化文件。 配置文件的格式如下所示: 模…

win11虚拟机安装

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

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

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

java 知识点

基本语法: 变量和数据类型控制流语句(if、else、switch)循环语句(for、while、do-while)面向对象编程(OOP): 类和对象 封装、继承和多态性构造方法和析构方法抽象类和接口 异常处…

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

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

Docker Compose用法详解

文章目录 Docker Compose是什么安装Docker ComposeCompose文件编写使用Docker Compose部署-管理应用 Docker Compose是什么 Docker Compose是一个用于定义和运行多容器Docker应用程序的python工具。它允许您使用一个单独的配置文件来定义和配置多个相关容器的服务,…

【leetcode】454. 四数相加 II(medium)

给你四个整数数组 nums1、nums2、nums3 和 nums4 &#xff0c;数组长度都是 n &#xff0c;请你计算有多少个元组 (i, j, k, l) 能满足&#xff1a; 0 < i, j, k, l < nnums1[i] nums2[j] nums3[k] nums4[l] 0 思路&#xff1a;如果要暴力&#xff0c;那么时间复杂…

Unity 基础函数

Mathf&#xff1a; //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; …

GCLIB动态代理

1.创建要代理的类 public class Boy {public void eat() {System.out.println("eat");} } 2.创建拦截器 public class MyMethodInterceptor implements MethodInterceptor {Overridepublic Object intercept(Object o, Method method, Object[] objects, MethodPr…

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

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

git rebase

git rebase 详解git rebase&#xff0c;让你走上git大神之路 - 知乎 git练习 Learn Git Branching

AIGC之stable diffusion(SD)炼丹总结

1 stable diffusion技术介绍 2 常用资源 社区&#xff1a; civitai : 主流的AI绘画模型分享网站, 可以看大家分享出来的模型和生成的图像。 但是国内用户要访问这个网站&#xff0c; 需要科学上网。 aigccafe 这个是civitai的国内镜像网站&#xff0c;推荐使用这个。 代码…

bootloader跳转APP注意事项

在gd32f427 时跳转异常 参考文章&#xff1a; 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 关闭全部中断&#xff0c;并且清除中…

springcloud3 springcloud stream的学习以及案例

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

力扣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&…

深度ip转换器:一键更换ip地址方法

很多网友问小编有关深度ip转换器怎么用&#xff1f;最新深度ip转换器手机版app&#xff1f;下面小编整理了深度ip转换器怎么修改ip地址的技巧和诀窍&#xff0c; 让我们来详细的了解一下深度id转换器&#xff0c; 一、深度ip转换器怎么用 1.深度ip转换器怎么用&#xff0c;深度…

JavaScript:深入探索async/await的使用

在JavaScript的异步编程领域&#xff0c;ES8引入的async/await语法是一项重要的创新。它让异步代码看起来更像同步代码&#xff0c;使得处理异步操作变得更加清晰和简洁。本文将深入探索async/await的使用&#xff0c;帮助你充分发挥这项技术的优势。 1. 什么是async/await&…

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 第…