当前位置:网站首页>select命令产生redo日志问题的分析
select命令产生redo日志问题的分析
2022-04-23 06:02:00 【还不算晕】
近期,某用户在进行SQL优化时,通过sqlplus的set autotrace on命令跟踪SQL执行情况时,发现这条SELECT命令竟然也产生了REDO日志;与我们通常理解的DML/DDL语句才产生REDO日志的认识存在差异~
对ORACLE数据库的特性了解比较清楚的话,特别是数据块、事务处理方面有较深入学习理解,会知道ORACLE数据库的事务、数据块中ITL事务槽的一些原理、结构信息;会知道一个概念叫“延迟块清除”--delayed block cleanout,在约9年前我在学习了解这一块知识时,对相关概念原理进行总结并进行了测试,可以查看当时的BLOG:关于延迟块清除的概念及实验_还不算晕的博客-CSDN博客
简单说就是:
在大事务时可能会操作很多数据块;而BUFFER CACHE中被修改的脏数据写入数据文件中的时机不是COMMIT而是DBWR按规则进行的;所以存在事务相关的数据块先被刷出了 buffer cache,而此时COMMIT还未执行。
当本次事务COMMIT提交后,事务相关的data block ,undo block 上的事务信息,锁信息不会被清除。
当下一次数据块读取到buffer cache(可能是SELECT读取或其它DML), oracle在读取这类数据块时作事务信息、锁信息的清除处理。
Statistics
----------------------------------------------------------
105 recursive calls
0 db block gets
1343685 consistent gets
550158 physical reads
28532 redo size ====>>>> SELECT时产生的REDO
2940 bytes sent via SQL*Net to client
520 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
11 sorts (memory)
0 sorts (disk)
15 rows processed
版权声明
本文为[还不算晕]所创,转载请带上原文链接,感谢
https://blog.csdn.net/q947817003/article/details/124348689
边栏推荐
- Ansible basic commands, roles, built-in variables and tests judgment
- 【OSS文件上传快速入门】
- ansible模块之include_tasks:为什么加了tags后导入的任务没有执行?
- [no steps in a small step to a thousand miles] Oracle Application derivative ora-01455 error reporting processing
- JS function package foreach use return can not jump out of the outer function
- Prometheus Cortex使用Block存储时的相关问题
- SSM项目在阿里云部署
- Memcached source code analysis
- tc ebpf 实践
- Openvswitch compilation and installation
猜你喜欢

Winter combat camp hands-on combat - cloud essential environment preparation, hands-on practical operation, quickly build lamp environment, lead mouse cloud Xiaobao backpack without shadow

Prometheus Thanos快速指南

数据库基本概念:OLTP/OLAP/HTAP、RPO/RTO、MPP

Introduction to DDoS attack / defense

Detailed explanation of RDMA programming

【OSS文件上传快速入门】

Redis practice notes and source code analysis
![[OSS file upload quick start]](/img/db/9043d1df0163a7154bebac8e79097f.png)
[OSS file upload quick start]

Prometheus Cortex架构概述(水平可扩展、高可用、多租户、长期存储)

Virtio and Vhost_ Net introduction
随机推荐
SSM项目在阿里云部署
2021年国产数据库12强介绍
rdma 编程详解
Prometheus Cortex多租户读写的实现
ubuntu下搭建mysql环境 & 初识SQL
DDOS攻击/防御介绍
Introduction to the top 12 domestic databases in 2021
【漏网之鱼】Ansible AWX调用playbook传参问题
重启Oracle监听器会中断已有连接吗
tensorflow下载
[step by step, even thousands of miles] MySQL reports a large number of unauthenticated user connection errors
Arranges the objects specified in the array in front of the array
【MySQL基础篇】启动选项、系统变量、状态变量
TC ebpf practice
使用prom-label-proxy实现Prometheus Thanos的基于标签的多租户读
High performance gateway for interconnection between VPC and IDC based on dpdk
异常记录-21
[fish in the net] ansible awx calls playbook to transfer parameters
Practice using polardb and ECs to build portal websites
virtio 与vhost_net介绍