Oracle® Database Administrator's Guide 11g Release 2 (11.2) Part Number E10595-04 |
|
|
View PDF |
To alter a cluster, your schema must contain the cluster or you must have the ALTER ANY CLUSTER
system privilege. You can alter an existing cluster to change the following settings:
Physical attributes (INITRANS
and storage characteristics)
The average amount of space required to store all the rows for a cluster key value (SIZE
)
The default degree of parallelism
Additionally, you can explicitly allocate a new extent for the cluster, or deallocate any unused extents at the end of the cluster. The database dynamically allocates additional extents for the data segment of a cluster as required. In some circumstances, however, you might want to explicitly allocate an additional extent for a cluster. For example, when using Real Application Clusters, you can allocate an extent of a cluster explicitly for a specific instance. You allocate a new extent for a cluster using the ALTER CLUSTER
statement with the ALLOCATE EXTENT
clause.
When you alter the cluster size parameter (SIZE
) of a cluster, the new settings apply to all data blocks used by the cluster, including blocks already allocated and blocks subsequently allocated for the cluster. Blocks already allocated for the table are reorganized when necessary (not immediately).
When you alter the transaction entry setting INITRANS
of a cluster, the new setting for INITRANS
applies only to data blocks subsequently allocated for the cluster.
The storage parameters INITIAL
and MINEXTENTS
cannot be altered. All new settings for the other storage parameters affect only extents subsequently allocated for the cluster.
To alter a cluster, use the ALTER CLUSTER
statement.
You can alter clustered tables using the ALTER TABLE
statement. However, any data block space parameters, transaction entry parameters, or storage parameters you set in an ALTER TABLE
statement for a clustered table generate an error message (ORA-01771, illegal option for a clustered table
). The database uses the parameters of the cluster for all clustered tables. Therefore, you can use the ALTER TABLE
statement only to add or modify columns, drop non-cluster-key columns, or add, drop, enable, or disable integrity constraints or triggers for a clustered table. For information about altering tables, see "Altering Tables".
You alter cluster indexes exactly as you do other indexes. See "Altering Indexes".
Note:
When estimating the size of cluster indexes, remember that the index is on each cluster key, not the actual rows. Therefore, each key appears only once in the index.