|Lesson 7|| Tablespace default extents |
|Objective||Set the default Storage for all the extents in a tablespace. |
Oracle Tablespace default Extents
You can assign storage parameters for each individual table and index in your database.
You may not want to define these parameters for every database object, however, because many of the objects in a database share the same storage characteristics.
In this situation you can assign storage attributes for a tablespace. Any objects stored in that tablespace will use the default storage characteristics of the tablespace. You still can assign specific storage parameters explicitly for any objects within the tablespace.
View the Code below.
In the following example, a tablespace is created and the default storage characteristics are assigned.
CREATE TABLESPACE tabspace_1
DATAFILE 'd:\\:tabspace_file2.dat' SIZE 20M
DEFAULT STORAGE (INITIAL 10K NEXT 50K MINEXTENTS 1 MAXEXTENTS 999 PCTINCREASE 10)
Tablespaces and storage characteristics
Some database administrators recommend creating different tablespaces, with different default storage characteristics,
to hold different types of database objects. You can then assign objects that require larger extents to one tablespace, objects that benefit from smaller extents to another tablespace, and so on.
The other side of this argument is that tablespace is too important in overall Oracle operations to use it to manage extent spaces.
The best course of action depends on both the number of database objects you have and your own personal preferences.
Saving the overhead of specifying extents for 1,000 database objects may not be worth subsuming the purpose of the tablespace, while saving the overhead for creating and maintaining 100,000 objects may justify this approach.
Oracle Tablespace Quiz
Click the Quiz link below to answer a few questions about setting extent sizes.Oracle Tablespace Quiz
The next lesson shows how to check on storage attributes in the data dictionary.