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.mfbz.cn/a/67383.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

数据结构--栈和队列

文章目录 栈的概念和结构栈的实现栈的数据结构栈的初始化和销毁出栈和入栈获取栈顶、大小,判空 队列的概念和结构队列的实现队列的数据结构队列的初始化和销毁队列的插入 队列的删除获取队头和队尾的数据获取队列长度和判空 栈和队列的一些题目1.有效的括号2.用队列…

教你连接本地树莓派

如何连接本地树莓派 文章目录 如何连接本地树莓派前言1. 操作流程2. 打开树莓派SSH功能3. 确认树莓派信息后 安装相应SSH客户端 前言 树莓派作为一款以教育为目的推出的硬件系统,也是超低功耗的微型“准系统”,能够提供基础的电脑应用体验。而得益于其极…

微信开发之获取标签详情的技术实现

简要描述: 获取标签列表 请求URL: http://域名地址/getContactLabelList 请求方式: POST 请求头Headers: Content-Type:application/jsonAuthorization:login接口返回 参数: 参数名必选…

服务限流治理

一、基础概念 1.什么是服务限流? 限流在日常生活中也很常见,比如节假日你去一个旅游景点,为了不把景点撑爆,管理部门通常会在外面设置拦截,限制景点的进入人数(等有人出来之后,再放新的人进去…

为什么还有很多人不喜欢使用微信电话?让人感到困扰

尽管微信电话在技术上非常便利和实用,但仍然有很多人不太喜欢使用它。这引发了一个问题:为什么还有这么多人对微信电话感到困扰呢? 一、容易造成隐私泄露 在很多情况下,我们经常会收到好友的微信电话。然而,如果在这个…

(Python)Requests+Pytest+Allure接口自动化测试框架从0到1搭建

前言:本文主要介绍在企业使用Python搭建接口自动化测试框架,数据驱动读取excel表里的数据,和数据库方面的交互,包括关系型数据库Mysql和非关系型数据库MongDB,连接数据库,读取数据库中数据,最后…

MySQL事务:ACID特性实现原理

事务是MySQL等关系型数据库区别于NoSQL的重要方面,是保证数据一致性的重要手段。本文将首先介绍MySQL事务相关的基础概念,然后介绍事务的ACID特性,并分析其实现原理。 MySQL博大精深,文章疏漏之处在所难免,欢迎批评指…

Eudic欧路词典 for Mac v4.4.5增强版

欧路词典 (Eudic)是一个功能强大的英语学习工具,它包含了丰富的英语词汇、短语和例句,并提供了发音、例句朗读、单词笔记等功能。 多语种支持:欧路词典支持多种语言,包括英语、中文、日语、法语等等,用户可以方便地进…

【计算机网络】概述及数据链路层

每一层只依赖于下一层所提供的服务,使得各层之间相互独立、灵活性好,已于实现和维护,并能促进标准化工作。 应用层:通过应用进程间的交互完成特定的网络应用,HTTP、FTP、DNS,应用层交互的数据单元被称为报…

List和数组互转方法以及踩坑点

一、数组转List 1. 使用for循环逐个添加 String[] array {"A", "B", "C"}; List<String> list new ArrayList<>(); for (String element : array) {list.add(element); }2. 使用Arrays.asList(arr) String[] array {"A&q…

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

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

数字万用表测量基础知识--使用DMM测量电阻

概览 DMM&#xff08;即数字万用表&#xff09;是一种电气测试和测量仪器&#xff0c;可测量直流和交流信号的电压、电流和电阻。本文介绍如何正确使用和理解数字万用表(DMM)。 使用DMM测量电阻 电阻测量通常用于测量电阻器或其他组件的电阻&#xff0c;如传感器或扬声器。电…

全开源跨境电商一键铺货货源平台--后台数据采集功能

数据库设计在设计数据库时&#xff0c;需要考虑到以下信息&#xff1a; 货源信息&#xff1a;包括货源标题、价格、描述、图片等信息。 用户信息&#xff1a;包括用户名、密码、邮箱、电话等信息。 订单信息&#xff1a;包括订单号、用户信息、货源信息、支付信息等。 支付信息…

【白猫】图片转文字在线-图片文字提取

图片转文字 - 图片转Excel表格 - PDF转Word - 白描网页版白描&#xff0c;高效准确的中文ocr文字识别软件与文件扫描软件&#xff0c;支持简体、繁体、英文、韩语、日语、俄语等多国语言的准确识别&#xff0c;高清晰的文件扫描合成PDF,好用的手机扫描仪&#xff0c;可以表格识…

知识图谱推荐系统研究综述

基于协同过滤的推荐是当前应用最为广泛的推荐方法,但也存在着新用户或新项目的冷启动以及数据稀疏等问题。针对上述两种方法出现的问题,研究者进一步提出了混合推荐系统。混合推荐系统结合上述两种方法的优点,可以有效缓解其中的不足,增加推荐的准确性。但是,混合推荐系统…

clickhouse 删除操作

OLAP 数据库设计的宗旨在于分析适合一次插入多次查询的业务场景&#xff0c;市面上成熟的 AP 数据库在更新和删除操作上支持的均不是很好&#xff0c;当然 clickhouse 也不例外。但是不友好不代表不支持&#xff0c;本文主要介绍在 clickhouse 中如何实现数据的删除&#xff0c…

从数据仓库到数据结构:数据架构的演变之路

在上个世纪&#xff0c;从电子商务巨头到医疗服务机构和政府部门&#xff0c;数据已成为每家组织的生命线。有效地收集和管理这些数据可以为组织提供宝贵的洞察力&#xff0c;以帮助决策&#xff0c;然而这是一项艰巨的任务。 尽管数据很重要&#xff0c;但CIOinsight声称&…

定制 ChatGPT 以满足您的需求 自定义说明

推荐&#xff1a;使用 NSDT场景编辑器 快速助你搭建可二次编辑的3D应用场景 20 月 <> 日&#xff0c;OpenAI 宣布他们正在引入带有自定义说明的新流程&#xff0c;以根据您的特定需求定制 ChatGPT。 什么是自定义说明&#xff1f; 新的测试版自定义指令功能旨在通过防止…

BM8 链表中倒数最后k个结点

/*** struct ListNode {* int val;* struct ListNode *next;* ListNode(int x) : val(x), next(nullptr) {}* };*/ class Solution { public:/*** 代码中的类名、方法名、参数名已经指定&#xff0c;请勿修改&#xff0c;直接返回方法规定的值即可** * param pHead ListNode类 …

leetcode 343. 整数拆分

2023.8.10 本题用dp算法来做&#xff0c;dp[i]代表的含义是&#xff1a;当前数字i 在拆分之后所能获得的最大乘积。然后由于n>2&#xff0c;所以dp[0]和dp[1]没有意义&#xff0c;不用初始化&#xff0c;直接初始化dp[2] 1。 然后再遍历给dp数组赋值&#xff1a;dp[i]的来源…