Beruflich Dokumente
Kultur Dokumente
All the examples shown here use the users tablespace for all partitions. In a real situation it is
likely that these partitions would be assigned to different tablespaces to reduce device contention.
Range Partitioning Tables
Hash Partitioning Tables
Composite Partitioning Tables
List Partitioning (Only with 9i above)
Composite Range-List Partitioning (Only with 9i above)
Partitioning Indexes
Local Prefixed Indexes
Local Non-Prefixed Indexes
Global Prefixed Indexes
Global Non-Prefixed Indexes
Partitioning Existing Tables
invoice_date DATE
NOT NULL,
comments
VARCHAR2(500))
PARTITION BY HASH (invoice_no)
(PARTITION invoices_q1 TABLESPACE
PARTITION invoices_q2 TABLESPACE
PARTITION invoices_q3 TABLESPACE
PARTITION invoices_q4 TABLESPACE
users,
users,
users,
users);
DD-MON-YYYY),
DD-MON-YYYY),
DD-MON-YYYY),
DD-MON-YYYY),
DD-MON-YYYY),
DD-MON-YYYY),
DD-MON-YYYY),
DD-MON-YYYY)
Partitioning Indexes
There are two basic types of partitioned index:
Local - All index entries in a single partition will correspond to a single table partition
(equipartitioned). They are created with the LOCAL keyword and support partition
independance. Equipartioning allows oracle to be more efficient whilst devising query
plans.
Global - Index in a single partition may correspond to multiple table partitions. They are
created with the GLOBAL keyword and do not support partition independance. Global
indexes can only be range partitioned and may be partitioned in such a fashion that they
look equipartitioned, but Oracle will not take advantage of this structure.
Note that the partition range values must be specified. The GLOBAL keyword means that Oracle
can not assume the partition key is the same as the underlying table.
TABLE_NAME
PARTITION_NAME
HIGH_VALUE
NUM_ROWS
------------------------------ ------------------------------------------------- ---------MY_TABLE
MY_TABLE_PART_1
3
2
MY_TABLE
MY_TABLE_PART_2
MAXVALUE
2
2 rows selected.