Direct path read LOB

news2025/2/27 7:09:29

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.coloradmin.cn/o/862649.html

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

相关文章

《赏金猎人》华为对战平台,新手部署指南!

《赏金猎人》是一款休闲联机对战小游戏,目前已免费上架 Cocos Store 资源商城。 本文重点介绍,如何在该游戏中集成华为联机对战能力。 开发环境 Cocos Creator:Cocos Creator 3.7.2Android:Android Studio 3.6.1微信小游戏&#x…

DenseNet网络分析

文章目录 DenseNet结构Dense Layer & Dense BlockDense Layer的宽度Transition Layers 对比实验网络结构训练参数对比结果CIFAR-10,CIFAR-100,SVHN ImageNet数据集 进一步分析 从ResNet开始,有很多研究都是琢磨怎么通过提高深度网络中层与…

【C# 基础精讲】字典(Dictionary)的使用

在C#中&#xff0c;Dictionary<TKey, TValue>是一种非常常用的泛型集合类&#xff0c;用于存储键值对&#xff08;Key-Value Pair&#xff09;的数据结构。Dictionary<TKey, TValue>可以根据键快速查找对应的值&#xff0c;因此在需要快速查找和检索数据的场景下&a…

Lorenz系统最大lyapunov exponent的求解

首先看下Lorenz混沌系统: 赋予初始值,例如: 当然,初始值可以根据需要设定。 看下他的吸引子,很美: 看下他的分叉图:

【uniapp】使用Vs Code开发uniapp:

文章目录 一、使用命令行创建uniapp项目&#xff1a;二、安装插件与配置&#xff1a;三、编译和运行:四、修改pinia&#xff1a; 一、使用命令行创建uniapp项目&#xff1a; 二、安装插件与配置&#xff1a; 三、编译和运行: 该项目下的dist》dev》mp-weixin文件导入微信开发者…

SLAM框架与相关理论梳理

应该是思维导图的形式使用markmap实现,可以使用md文档在VSCode中添加插件预览,预览图如绑定的那个资源的样式。 效果大概是长这个样子 > 但是CSDN不好用,一堆乱码。这里建议从这个链接中复制下载md文件,使用VSCode的markmap插件查看,或者直接把md的内容复制到markmap网…

Java SPI机制详解-01

1. 概述 SPI&#xff08;Service Provider Interface&#xff09;&#xff0c;是 Java 6 引入了一个内置功能&#xff0c;实现服务提供发现和加载机制&#xff0c;使之与特定接口的匹配。 SPI 机制的核心思想就是 解耦 &#xff0c;将装配的控制权移到程序之外&#xff0c;这…

多模态图像融合的相关驱动双分支特征分解

文章目录 CDDFuse: Correlation-Driven Dual-Branch Feature Decomposition for Multi-Modality Image Fusion摘要本文方法损失函数 实验结果 CDDFuse: Correlation-Driven Dual-Branch Feature Decomposition for Multi-Modality Image Fusion 摘要 多模态图像融合的目的是使…

GaussDB之SQL Audit,面向应用开发的SQL审核工具

前言 我们先从一个SQL语句说起&#xff08;以某传统单机数据库为例&#xff09;。 也许这就是我们业务代码中潜藏的一个SQL语句&#xff0c;对于一个普通开发者来说&#xff0c;这个语句编写工整&#xff0c;逻辑清晰&#xff0c;没有什么问题&#xff0c;可以直接推到代码仓中…

只需要一个技巧,医疗设备立马大变样!

当谈及医疗领域中的设备运行与维护&#xff0c;蓄电池的监控成为至关重要的一环。医疗设备的顺利运行直接关系到患者的生命安全和医疗工作的有效性。为此&#xff0c;对医疗设备所使用的蓄电池进行实时监控和管理显得尤为关键。 蓄电池监控不仅提高了医疗设备的可靠性&#xff…

7个位运算符(二进制运算)(左移右移运算符的使用)

位运算符运算符运算范例<<左移>>右移>>>无符号右移& 与运算 &#xff08;按位与&#xff09; & | 或运算 &#xff08;按位或&#xff09; ^ 异或运算 &#xff08;按位异或&#xff09; ~ 取反运算 &#xff08;按位取反&…

Apache-Maven

安装Maven 解压apache-maven到目录下 Maven目录如下 bin&#xff1a;目录中存放的是可执行文件&#xff0c;JAVA项目中的编译执行打包都要使用bin. conf:存放的是Maven的配置文件&#xff0c;本地配置、私服配置都需要在conf下的settings.xml进行配置。 lib下存放的是Maven所…

高精度、抗干扰强、低功耗:双频四模卫星定位导航GPS/北斗模块SKG123LD参考设计

北斗定位很好理解&#xff0c;就是通过测量出已知位置的卫星导北斗模块之间的距离&#xff0c;再综合多可卫星的数据计算出北斗模块所在位置的经纬度信息。北斗模块和GPS模块一样&#xff0c;北斗模块被称为用户部分&#xff0c;它像“收音机”捕获并跟踪卫星的信号&#xff0c…

TreeSize优化Windows磁盘空间

TreeSize优化Windows磁盘空间 C盘空间爆红下载连接 C盘空间爆红 最近电脑C盘空间爆红&#xff0c;软件卡顿&#xff0c;从网上下载各种厂商软件辅助清理C盘&#xff0c;效果都不理想&#xff0c;要么提示能给你优化几十G的空间&#xff0c;但是一点击执行&#xff0c;哐哐&…

Xcode 基座打包

Xcode基座打包-APP更新版本内容无效 问题&#xff1a;解决&#xff1a; 问题&#xff1a; 使用xcode基座打包之后&#xff0c;上传到appstore进行提审发布。 用户在appstore商城进行更新下载&#xff0c;打开更新后的APP发现版本号是最新的&#xff0c;APP里面的其他内容还是上…

实现简单通信 JAVA

创建服务端与客户端&#xff0c;再利用Java中socket编程传入传出数据 服务端 import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.*; public class QqMain extends JFrame implements ActionListener{public static void …

CentOS7 安装远程桌面

换源 设置镜像源为清华源&#xff1a; sudo sed -e s|^mirrorlist|#mirrorlist|g \-e s|^#baseurlhttp://mirror.centos.org/centos|baseurlhttps://mirrors.tuna.tsinghua.edu.cn/centos|g \-i.bak \/etc/yum.repos.d/CentOS-*.repo详见 https://mirrors.tuna.tsinghua.edu.…

【无标题】echarts pieChart legend 图例文字颜色与图例一致

先看成图效果 首先是封装一个公用的函数 const renderPieEcharts (ele: HTMLDivElement,data: Record<string, any>[],color: string[],titleText: string, ) > {const legendData data.map((item, i) > ({name: item.name,textStyle: {color: color[i],},}))co…

【python】python将json字符串导出excel | pandas处理json字符串保存为csv

如何将json转为csv 1、通过json直接转为csv 在Python中&#xff0c;你可以使用pandas库来处理DataFrame&#xff08;数据帧&#xff09;和将JSON数据转换为CSV格式。下面是一个简单的示例代码&#xff0c;展示了如何使用pandas库将JSON数据转换为CSV文件&#xff1a; import p…

前段汇总之JS实现数据双向绑定

参考vue的关键字&#xff1a;v-model绑定值&#xff0c;{{}}&#xff0c;显示值 目录 简单实现双向绑定 使用Proxy优化双向绑定 动态更新值 简单实现双向绑定 新建html5模板&#xff1a; <!DOCTYPE html> <html lang"en"> <head><meta char…