本文介绍了Oracle中的分区和高水位线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Oracle数据库中表的高水位标记(HWM)是已使用的块与从未使用的块之间的界线.截断表会将HWM重置为零.

High Water Mark (HWM) for a table in an Oracle Database is the line between blocks that have been used and ones that have never been. Truncating a table resets the HWM to zero.

现在,如果我有一个分区表,我想知道以下情况是否正确:

Now, if I have a partitioned table, I'd like to know if the following is true:

  1. 每个分区都维护自己的HWM吗?
  2. 如果不是,alter table ... drop partition ...是否会影响表的HWM?
  1. Does each partition maintain its own HWM?
  2. If not, does alter table ... drop partition ... affect table's HWM?

这个想法是我想用insert /*+ append */(直接路径插入)填充分区的表,但是它只写HWM以外的数据,所以如果我重新创建分区,空间会被重用吗?我找不到有关此特定方面的信息.

The idea is I'd like to populate partition's tables with insert /*+ append */ (direct path insert), but it only writes data beyond the HWM, so will the space be reused if I recreate the partition? I failed to find information on this specific aspect.

推荐答案

每个分区都是一个单独的段,因此每个分区都有自己的HWM.我认为截断整个表将重置所有分区的HWM.您也可以截断单个分区,这肯定会重置该分区的HWM.

Each partition is a separate segment, so each would have its own HWM. I presume that truncating the whole table would reset the HWM for all partitions. You can truncate individual partitions as well, which certainly would reset the HWM for the partition.

这篇关于Oracle中的分区和高水位线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 13:48