| |
 |
|
Oracle Partitioning
Oracle Tips by Burleson Consulting
Don Burleson
|
Starting in Oracle9i we see several
important Oracle partitioning strategies, all designed to provide the
best-fit for your SQL queries to minimize I/O:
-
Range Partitioning
- Used when there are logical ranges of data. Possible usage: dates,
part numbers, and serial numbers.
-
Hash Partitioning - Used to spread data evenly over partitions.
Possible usage: data has no logical groupings.
-
List Partitioning - Used to list together unrelated data into
partitions. Possible usage: a number of states list partitioned into a
region.
-
Composite Range-Hash Partitioning - Used to range partition
first, then spreads data into hash partitions. Possible usage: range
partition by date of birth then hash partition by name; store the
results into the hash partitions.
-
Composite Range-List Partitioning - Used to range partition
first, then spreads data into list partitions. Possible usage: range
partition by date of birth then list partition by state, then store
the results into the list partitions.
Oracle 10g partitioning allows for easier DBA management and the 10g
partition-aware SQL will result in improved SQL performance.
As of 11g, we saw these new partitioning features. For full
details, see the book
Oracle 11g New Features: Expert Guide to the Important
New Features by John Garmany, Steve Karam, Lutz Hartmann, V. J.
Jain and Brian Carr.
-
Interval partitioning for tables - This is a new 11g
partitioning scheme that automatically creates time-based partitions as
new data is added. You can now partition by date, one partition per
month for example, with automatic partition creation.
Interval partitions build upon the
foundation introduced with range partitioning for Oracle 11g. Interval
partitioning resolves the limitations built into range partitioning
when a specific range is unknown by the developer or DBA creating the
partitions for the table. It tells Oracle to automatically setup new
partitions for a particular interval when data inserted to tables are
greater than the range partitions. As such
the requirement of interval partitioning dictates that at least one
range partition is specified. Once the range partitioning key is given
for the high value of the range partitions, this transition point is
used as the baseline to create interval partitions beyond this point.
-
System
Partitioning - The new system partitioning feature in Oracle 11g
provides you with the ability to implement and manage new partitions
without a specific partition key. Instead, each partition is mapped to a
tablespace using the extended partitioning syntax for system partitions.
Due to lack of partition keys with system partitioning, the usual
performance benefits available for partitioned tables do not exist with
system partitions. Another drawback to system partitions is that they
cannot be used for partition-wise joins or traditional partition pruning
operations. As such, the main benefit of using the new system
partitioning is for manageability purposes. Also see these notes
on
system partitioning in 11g.
|

|
|