Oracle® Database Administrator's Guide 11g Release 1 (11.1) Part Number B28310-01 |
|
|
View PDF |
This section describes the storage parameters that you can specify for schema object segments to tell the database how to store the object in the database. Schema objects include tables, indexes, partitions, clusters, materialized views, and materialized view logs
The following topics are contained in this section:
Storage parameters determine space allocation for objects when their segments are created in a tablespace. Not all storage parameters can be specified for every type of database object, and not all storage parameters can be specified in both the CREATE
and ALTER
statements. Storage parameters for objects in locally managed tablespaces are supported mainly for backward compatibility.
The Oracle Database server manages extents for locally managed tablespaces. If you specified the UNIFORM
clause when the tablespace was created, then the database creates all extents of a uniform size that you specified (or a default size) for any objects created in the tablespace. If you specified the AUTOALLOCATE
clause, then the database determines the extent sizing policy for the tablespace. So, for example, if you specific the INITIAL
clause when you create an object in a locally managed tablespace you are telling the database to preallocate at least that much space. The database then determines the appropriate number of extents needed to allocate that much space.
Table 17-1 contains a brief description of each storage parameter. For a complete description of these parameters, including their default, minimum, and maximum settings, see the Oracle Database SQL Language Reference.
Table 17-1 Object Storage Parameters
Parameter | Description |
---|---|
|
In a tablespace that is specified as |
|
In a tablespace that is specified as |
Defines a default buffer pool (cache) for a schema object. For information on the use of this parameter, see Oracle Database Performance Tuning Guide. |
At object creation, you can specify storage parameters for each individual schema object. These parameter settings override any default storage settings. Use the STORAGE
clause of the CREATE
or ALTER
statement for specifying storage parameters for the individual object.
Use the STORAGE
clause of the CREATE
TABLE
or ALTER
TABLE
statement to set the storage parameters for non-clustered tables.
In contrast, set the storage parameters for the data segments of a cluster using the STORAGE
clause of the CREATE
CLUSTER
or ALTER
CLUSTER
statement, rather than the individual CREATE
or ALTER
statements that put tables into the cluster. Storage parameters specified when creating or altering a clustered table are ignored. The storage parameters set for the cluster override the table storage parameters.
With partitioned tables, you can set default storage parameters at the table level. When creating a new partition of the table, the default storage parameters are inherited from the table level (unless you specify them for the individual partition). If no storage parameters are specified at the table level, then they are inherited from the tablespace.
Storage parameters for an index segment created for a table index can be set using the STORAGE
clause of the CREATE
INDEX
or ALTER
INDEX
statement.
Storage parameters of an index segment created for the index used to enforce a primary key or unique key constraint can be set in either of the following ways:
In the ENABLE
... USING
INDEX
clause of the CREATE
TABLE
or ALTER
TABLE
statement
In the STORAGE
clause of the ALTER
INDEX
statement
A table or materialized view can contain LOB
, varray, or nested table column types. These entities can be stored in their own segments. LOB
s and varrays are stored in LOB
segments, while a nested table is stored in a storage table. You can specify a STORAGE
clause for these segments that will override storage parameters specified at the table level.
See Also:
Oracle Database SecureFiles and Large Objects Developer's Guide for more information about LOBs
Oracle Database Object-Relational Developer's Guide for more information about varrays and nested tables
You can alter default storage parameters for tablespaces and specific storage parameters for individual objects if you so choose. Default storage parameters can be reset for a tablespace; however, changes affect only new objects created in the tablespace or new extents allocated for a segment. As discussed previously, you cannot specify default storage parameters for locally managed tablespaces, so this discussion does not apply.
The INITIAL
and MINEXTENTS
storage parameters cannot be altered for an existing table, cluster, index. If only NEXT
is altered for a segment, the next incremental extent is the size of the new NEXT
, and subsequent extents can grow by PCTINCREASE
as usual.
If both NEXT
and PCTINCREASE
are altered for a segment, the next extent is the new value of NEXT
, and from that point forward, NEXT
is calculated using PCTINCREASE
as usual.
Starting with default values, the storage parameters in effect for a database object at a given time are determined by the following, listed in order of precedence (where higher numbers take precedence over lower numbers):
Oracle Database default values
DEFAULT STORAGE
clause of CREATE TABLESPACE
statement
DEFAULT STORAGE
clause of ALTER TABLESPACE
statement
STORAGE
clause of CREATE [TABLE
| CLUSTER
| MATERIALIZED VIEW
| MATERIALIZED VIEW LOG
| INDEX]
statement
STORAGE
clause of ALTER [TABLE
| CLUSTER
| MATERIALIZED VIEW
| MATERIALIZED VIEW LOG
| INDEX]
statement
Any storage parameter specified at the object level overrides the corresponding option set at the tablespace level. When storage parameters are not explicitly set at the object level, they default to those at the tablespace level. When storage parameters are not set at the tablespace level, Oracle Database system defaults apply. If storage parameters are altered, the new options apply only to the extents not yet allocated.