My Oracle Support Banner

How to Rebuild an Index (Doc ID 232819.1)

Last updated on JUNE 29, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 8.0.3.0 and later
Oracle Database - Personal Edition
Information in this document applies to any platform.

Purpose

Purpose
=======

Show how to rebuild an existing index.

  Background:
    You use the REBUILD clause of ALTER INDEX command to re-create an existing
    index or one of its partitions or subpartitions.  For a function-based
    index, this clause also enables the index. If the function on which the
    index is based does not exist, the rebuild statement will fail. 

  Restrictions: 
    1) You cannot rebuild an index on a temporary table. 
    2) You cannot rebuild an entire partitioned index.  You must rebuild each 
       partition or subpartition.
    3) You cannot also specify the deallocate_unused_clause in this statement. 
    4) You cannot change the value of the PCTFREE parameter for the index as a
       whole (ALTER INDEX) or for a partition (ALTER INDEX ... MODIFY PARTITION).
       You can specify PCTFREE in all other forms of the ALTER INDEX statement. 

  Please see the Oracle SQL Reference manual (ALTER INDEX command) specific to 
  the version of Oracle in use for a complete list of available syntax 
  and restrictions.

Scope

Scope & Application
===================

DBA's and others who need the basic syntax to rebuild an existing index.

Details

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.