Partition Fast Split 不起作用时应检查的内容 (Doc ID 378138.1)
What to Check When Partition Fast Split does Not Appear Working (Doc ID 378138.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 9.2.0.7 and later
Information in this document applies to any platform.
GOAL
What to check when the fast split partitioning does not appear as working? 快速拆分分区无法正常工作时该怎么检查
SOLUTION
First of all, fast split partitioning is a feature that can only be used for heap tables starting with the release 9.2 and for IOTs starting with release 10.2. It cannot be used for indexes or any other storage objects. 首先,快速拆分分区是一项功能,只能用于从9.2版开始的堆表和从10.2版开始的IOT。它不能用于索引或任何其他存储对象
In order to be able to perform such an operation, the following things have to be respected: 为了能够执行这样的操作,必须注意以下几点
1. According to the documentation:
"Fast split partitioning takes advantage of those situations in which a split partition results in all rows being moved to a single partition. If all the rows map into a single partition and if the segment attributes of the old partition and the segment attributes of the partition inheriting all the rows match, then the database simply reuses the old segment and adds an empty segment for the other partition. Another benefit of this is that global indexes do not have to be invalidated and, in certain cases, local index partitions corresponding to the new partitions are also usable."
Thus, the new partitions should have the same storage configuration as the original partition.
“快速拆分分区利用了以下情况:拆分分区导致所有行都移到单个分区。如果所有行都映射到单个分区,并且旧分区的段属性和分区的段属性 继承所有行匹配的内容,数据库将简单地重用旧段并为另一个分区添加一个空段,这样做的另一个好处是不必使全局索引无效,并且在某些情况下,本地索引分区对应于 新的分区也可以使用。” 因此,新分区应具有与原始分区相同的存储配置。
2. The COMPATIBLE parameter should be set to 9.2.0.0.0 for heap tables. This is a new feature in 9.2 but applies only to heap tables under this release. 对于堆表,COMPATIBLE参数应设置为9.2.0.0.0。 这是9.2中的新功能,但仅适用于此版本下的堆表。
The same feature has been implemented for IOTs in 10.2, thus, for IOTs the operation would only succeed in 10.2 and only when COMPATIBLE is set to 10.2.0.0.0 minimum. 在10.2中为IOT实现了相同的功能,因此,对于IOT,该操作仅在10.2中且仅当COMPATIBLE设置为最低10.0.2.0.0时才能成功
3. Statistics should be accurate 统计信息应准确
Accurate statistics should be gathered not just on the (sub)partition to be split, but on the indexes of the table as well. 准确的统计信息不仅应收集在要拆分的(子)分区上,还应收集表的索引。
The reason for this is that oracle executes recursive queries on the (sub)partition to be split in order to see the number of rows < AT <value> and >= AT <value>, so that it can be determined whether one of the resulting partitions is empty. 原因是oracle在要拆分的(子)分区上执行递归查询,以便查看行数<AT <value>和> = AT <value>,以便可以确定是否其中一个结果分区为空。
Accurate statistics are important in order to avoid suboptimal execution plan for any of these recursive SQLs. 准确的统计信息对于避免任何这些递归SQL的执行计划都不理想非常重要。
4. If the above conditions are met, and the fast split is still not performed, trace the fast split in the following way. 如果满足上述条件,但仍不执行快速拆分,请按照以下方式跟踪快速拆分
The resulting trace file should give the reason for the fast split failure as well as where the time is taken. 生成的跟踪文件应说明快速拆分失败的原因以及花费的时间
ALTER SESSION SET tracefile_identifier='MYTRACE'; ALTER SESSION SET MAX_DUMP_FILE_SIZE = unlimited; ALTER SESSION SET events '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12'; alter session set events '14525 trace name context forever, level 2'; run the split operation here
You can check if fast split was done or not by looking at the dba_extents view before and after the split. 您可以通过查看拆分前后的dba_extents视图来检查是否已完成快速拆分。
One of the resulting partitions which contains the data after the split should have identical file_id,extent_id and block_id with the original partition. 包含分割后数据的结果分区之一应具有与原始分区相同的file_id,extent_id和block_id。
Note that starting from 12.1 there is no segment created for a resulting partition that is empty. 请注意,从12.1开始,没有为空分区生成分区。
原文地址:https://www.cnblogs.com/zylong-sys/p/12123177.html
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- 手把手教你实现自定义Spring Boot的 Starter
- JVM详解之:本地变量的生命周期
- VBA解析复合文档01——实现的功能
- VBA解压缩ZIP文件09——解压-静态Huffman
- 第5章 流水线数据脱敏-Jenkins系统凭据管理
- 100% 展示 MySQL 语句执行的神器-Optimizer Trace
- Kafka消费者分区分配策略及自定义分配策略
- Java8新特性之日期、时间操作
- Java8新特性之Stream流(基础篇)
- Effective Java(一)
- Effective Java(二)
- Effective Java(三)
- Log4j 入门教程
- Map 和 Map 比较
- Java8新特性之Optional类