 |
|
Justifying Oracle Partitioning
Oracle Tips by Burleson Consulting
July 22, 2003 |
Partitioning is a
divide-and-conquer approach to improving Oracle maintenance and SQL
performance. Anyone with un-partitioned databases over 500 gigabytes is
courting disaster. Databases become unmanageable, and serious problems
occur:
-
Files recovery takes
days, not minutes
-
Rebuilding indexes
(important to re-claim space and
improve performance) can take days
-
Queries with
full-table scans take hours to complete
-
Index range scans
become inefficient
There are
many compelling reasons to implement partitioning for larger databases,
and partitioning has become the de-facto standard for systems over 500
gigabytes. Oracle partitioning has many benefits to improve
performance and manageability:
-
Stable
- Partitioning is a very stable technology and has been used in Oracle
since Oracle8, back in 1997. Each new release of Oracle improves
partitioning features.
-
Robust
– Oracle9i partitioning allows for multi-level keys, a combination
of the Range and List partitioning technique. The table is first
range-partitioned, and then each individual range-partition is further
sub-partitioned using a list partitioning technique. Unlike composite
Range-Hash partitioning, the content of each sub-partition represents
a logical subset of the data, described by its appropriate Range and
List partition setup.
-
Faster
backups - A DBA can back-up a single partition of a table, rather
than backing up the entire table, thereby reducing backup time.
-
Less
overhead – Because older partitioned tablespaces can be marked as
read-only, Oracle has less stress on the redo logs, locks and latches,
thereby improving overall performance. For more details, read
Robert Freeman's discussion of
read-only
tablespace performance.
-
Easier
management – Maintenance of partitioned tables is improved because
maintenance can be focused on particular portions of tables. For
maintenance operations across an entire database object, it is
possible to perform these operations on a per-partition basis, thus
dividing the maintenance process into more manageable chunks.
-
Faster
SQL – Oracle is partition-aware, and some SQL may improve is speed
by several orders of magnitude (over 100x faster).
- Index
range scans – Partitioning physically sequences rows in
index-order causing a dramatic improvement (over 10x faster) in the
speed of partition-key scans.
- Full-table
scans – Partition pruning only access those data blocks required
by the query.
- Table
joins – Partition-wise joins take the specific sub-set of the
query partitions, causing huge speed improvements on nested loop and
hash joins.
- Updates
– Oracle parallel query for partitions improves batch load speed
by
In sum,
partitioning has a very-fast payback time and the immediate improvements
to performance and stress reduction on the Oracle server makes it a
slam-dunk decision.
 |
If you like Oracle tuning, see the book "Oracle
Tuning: The Definitive Reference", with 950 pages of tuning tips and
scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |