可能导致index unusable的维护操作

转载 2013年12月03日 16:56:19

Six types of maintenance operationscan mark index partitions INDEX UNUSABLE.
In all cases, you must rebuild the index partitions when theoperation is
complete.

  1)   Operations like Import Partition or conventionalpath SQL*Loader
       that offer an option to bypass local indexmaintenance.  When the
       Import is complete, the affected local index partitions aremarked
       IU.

  2)   Direct path SQL*Loader leaves affected localindex partitions and
       global indexes in an IU state if the index is out of datewith
       respect to the data that it indexes.  The indexcan be out of date
       for the following reasons:

       a)  The index was not maintained during the loaddue to a space
           management error (for example, out of extents ORA-1653 or
           ORA-1652).

       b)  The user requested the SKIP_INDEX_MAINTENANCEclause.

  3)   Partition maintenance operations like ALTER TABLEMOVE PARTITION
       that change rowids.  These operations mark theaffected local index
       partition and all global index partitions IU.

  4)   Partition maintenance operations like ALTER TABLETRUNCATE PARTITION
       or DROP PARTITION that remove rows from thetable.  These operations
       mark the affected local index partition and all global index
       partitions IU.

  5)   Partition maintenance operations like ALTER TABLESPLIT PARTITION
       that modify the partition definition of local indexes but donot
       automatically rebuild the index data to match the newdefinitions.
       These operations mark the affected local index partitionsIU.  ALTER
       TABLE SPLIT PARTITION also marks all global index partitionsIU
       because it results in changes to rowids.

  6)   Index maintenance operations like ALTER INDEXSPLIT PARTITION that
       modify the partitioning definition of the index but do not
       automatically rebuild the affected partitions. These operations
       mark the affected index partitions IU.  However,if you split a
       USABLE partition of a global index, resulting partitions arecreated
       USABLE.  If the partition that was split wasmarked IU, then so are
       the partitions resulting from the split.  Notethat dropping a
       partition of a global index that is either IU or is not emptycauses
       the next partition of the index to become IU.


The ALTER INDEX REBUILD PARTITION statement can be used toregenerate a single
partition in a local or global partitioned index. This saves you from having
to perform DROP INDEX and then CREATE INDEX, which would affect allpartitions
in the index.

 

To prevent indexes to become unusable duringpartition maintenance operations, you can use 'update globalindexes' clause in 9.2,
'update global indexes' or 'update indexes' clauses in 10g andabove. For more details please consult the SQL Reference at ALTERTABLE for more details. Also, there are certain scenarios where theindexes are not marked unusable, e.g. DROP, TRUNCATE partitionnormally marks global indexes unusable, but not when the partitionto be dropped/truncated is empty. Similar with SPLIT partition,when the split results in adding a new empty partition to the table(all the rows of the partition to be split goes into one of theresulting partition, and the other partition remains empty).

相关文章推荐

OGG-00665 (status = 1502-ORA-01502: index 'index' or partition of such index is in unusable state)

今天同事在新搭建的压力测试环境启动某个 OGG replicat 进程时报了如下错误: 2013-05-14 16:37:41  ERROR   OGG-00665  OCI Error e...

Hadoop下进行反向索引(Inverted Index)操作

今天上网无意中看到了这篇文章,里面的效果不错,但是代码自己还没有验证过。想先留下来。这篇为转载,等自己调试代码通过后再发表个原创版的!   原版地址:http://blog.csdn.net/xw...
  • xhyzfl
  • xhyzfl
  • 2011年09月08日 15:56
  • 1157

rename 表操作后index是否依然可用

今天群里有人问起rename 表操作对index的影响。今天简单说一下: 首先ORACLE官方文档对RENAME操作的说明如下:   Use the RENAME statement to renam...

Hadoop下进行反向索引(Inverted Index)操作

参考资料: 代码参考1:http://www.pudn.com/downloads212/sourcecode/unix_linux/detail999273.html 理论参考2:http://...

rename 表操作后index是否依然可用

今天群里有人问起rename 表操作对index的影响。今天简单说一下: 首先ORACLE官方文档对RENAME操作的说明如下:   Use theRENAME statemen...

poi操作ppt,XSLFTableCell.setText报错:java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

POI版本3.14 用下面的代码生成一个带表格的pptx文件: public static void makeTablePpt() throws Exception{ //...

Lucene对index操作

package org.lucene.index;    import java.io.File;  import java.io.IOException;    import org.ap...

SQL之操作字符串函数CONCAT、SUBSTR、SUBSTRING、SUBSTRING_INDEX、LEFT、RIGHT

CONCAT() CONCAT(str1,str2,...) 返回字符串参数连接后的结果。参数是非二进制字符串(参数个数不固定),返回时非二进制字符串。 table - str1 s...

分布式搜索引擎elasticsearch PHP API index bulk 批量插入操作

利用SolrJ操作solr API完成index操作

使用SolrJ操作Solr会比利用httpClient来操作Solr要简单。SolrJ是封装了httpClient方法,来操作solr的API的。SolrJ底层还是通过使用httpClient中的方法...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:可能导致index unusable的维护操作
举报原因:
原因补充:

(最多只允许输入30个字)