This action might not be possible to undo. Are you sure you want to continue?
An Oracle White Paper June 2007
release. and should not be relied upon in making purchasing decisions. and may not be incorporated into any contract. Partitioning in Oracle Database 11g Page 2 . code. It is not a commitment to deliver any material. or functionality. It is intended for information purposes only.NOTE: The following is intended to outline our general product direction. The development. and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle.
....................................................................................................Partitioning in Oracle Database 11g !ote"...../tensions........................& 'asics of Partitioning.........................................................................................................................& 'enefits of Partitioning ....................................) Partitioning for *vailability ..................................................................+ Partitioning $ (odeling for your 'usiness........................................................................................................................................& Partitioning for (anageability ...................................................................................................................................13 Partitioning in Oracle Database 11g Page 3 ....) Partitioning for Performance ..................11 Partitioning -trategies and ............. 'asic Partitioning -trategies.......................& Introduction......................................................................................................................................................................1# Information 2ifecycle (anagement with Partitioning..............1# %onclusion......................................................................... Partitioning ..............10 Partition *dvisor..................................../tensions at a 1lance.....# Partitioning $ %oncepts................
is one of the most important and successful functionalities of the Oracle database.. This gives the administrator considerable fle/ibility in managing partitioned Partitioning in Oracle Database 11g Page # . and availability. Oracle Partitioning enables an efficient and simple. . improving the performance. first introduced in Oracle +.0 in 1. . and may optionally have its own storage characteristics. It is not unusual for partitioning to improve the performance of certain 6ueries or maintenance operations by an order of magnitude. Oracle Database 11g introduces the +th generation of partitioning which continues to offer ground4breaking new and enhanced functionality5 new partitioning techni6ues enable customers to model even more business scenarios while a complete new framework of partition advice and automation enables the usage of Oracle Partitioning for everybody. ENE!ITS O! PARTITIONING Partitioning can provide tremendous benefits to a wide variety of applications by improving manageability. Oracle Database 11g is considered the biggest new release for partitioning since its first introduction.). partitioning can greatly reduce the total cost of data ownership.ach piece of the database ob. continuing to protect our customers7 investment in partitioning for a decade. using a 8tiered archiving9 approach of keeping older relevant information still online on low cost storage devices. (oreover.ect has multiple pieces that can be managed either collectively or individually. <rom the perspective of a database administrator. yet very powerful approach when considering Information 2ifecycle (anagement for large environments. Partitioning is a key tool for building multi4terabyte systems or systems with e/tremely high availability re6uirements. inde/ or inde/4organi:ed table to be subdivided into smaller pieces.Partitioning in Oracle Database 11g PARTITIONING – CONCEPTS INTRODUCTION Oracle Partitioning. performance. and availability for tens of thousands of applications.ect is called a partition. a partitioned ob. asics o" Partitioning Partitioning allows a table. manageability. Partitioning also enables database designers and administrators to tackle some of the toughest problems posed by cutting4edge applications.ach partition has its own name.
using a monthly partitioning strategy5 the table appears to any application as a single. 1lobal4partitioned inde/es can be partitioned using range or hash partitioning and are uncoupled from the underlying table. Figure 1: Application and DBA perspective of a partitioned table Database ob. 7normal7 table. making partitioning well suited to support any kind of application.ob. The coupling enables optimi:ed partition maintenance5 for e/ample. an inde/ is either coupled or uncoupled with the underlying partitioning strategy of the underlying table.ect. 7inheriting7 the partitioning strategy from the table. Local Indexes: * local inde/ is an inde/ on a partitioned table that is coupled with the underlying partitioned table. =owever. Irrespective of the chosen inde/ partitioning strategy. while an inde/ on that table could be range4partitioned using a different partitioning key and have Partitioning in Oracle Database 11g Page $ . potentially using different storage tiers. when a table partition is dropped. <or e/ample the sales table shown in figure 1 is range4 partitioned on sales date. from the perspective of the application. applying table compression to the older data. a partitioned table is identical to a non4partitioned table5 no modifications are necessary when accessing a partitioned table using ->2 D(2 commands. each partition of a local inde/ corresponds to one 4 and only one 4 partition of the underlying table. Global Partitioned Indexes: * global partitioned inde/ is an inde/ on a partitioned or non4partitioned table that is partitioned using a different partitioning4key or partitioning strategy than the table. !o costly inde/ maintenance is re6uired. a table could be range4 partitioned by month and have twelve partitions. %onse6uently. Oracle simply has to drop the corresponding inde/ partition as well. inde/es. a set of columns which determine in which partition a given row will reside. The appropriate inde/ partitioning strategy is chosen based on the business re6uirements. or store complete ranges of older data in read only tablespaces. and inde/4organi:ed tables 4 are partitioned using a 7partitioning key7. the D'* can manage and store each monthly partition individually. <or e/ample. 2ocal inde/es are most common in data warehousing environments. =owever.ects 4 tables. Oracle Database 11g differentiates between three types of partitioned inde/es.
*nother advantage of using partitioning is when it is time to remove data. <or e/ample.ect. partitioning provides a number of performance benefits. Oracle additionally provides a comprehensive set of ->2 commands for managing partitioning tables. moving.table containing an historical record Partitioning in Oracle Database 11g Page ( .a different number of partitions. an entire partition can be dropped which is very efficient and fast. -uppose that a D'* loads new data into a table on weekly basis. These include commandsfor adding new partitions. That table could be range4partitioned so that each partition contains one week of data. compared to deleting each row individually. The inde/ structure is not partitioned and uncoupled from the underlying table. Partitioning "or Per"or'ance 'y limiting the amount of data to be e/amined or operated on. <or maintenance operations across an entire database ob. Partitioning "or %anageabilit& Oracle Partitioning allows tables and inde/es to be partitioned into smaller. since the D'* does not need to modify any other partitions. it is possible to perform these operations on a per4partition basis.a. dropping. rather than compressing the entire table. *dding a single partition is much more efficient than modifying the entire table. a database administrator could compress a single partition containing say the data for the year #00A of a table. Global Non-Partitioned Indexes: * global non4partitioned inde/ is essentially identical to an inde/ on a non4partitioned table.k. maintenance operations can be focused on particular portions of tables. These features include" Partitioning Pruning" Partitioning pruning Ba. providing database administrators with the ability to pursue a ?divide and con6uer? approach to data management.D. merging. @ith partitioning. Partition pruning can often improve 6uery performance by several orders of magnitude. <or e/ample. more manageable units. truncating. The load process is simply the addition of a new partition. splitting. the most common usage of global non4 partitioned inde/es is to enforce primary key constraints. 1lobal partitioned inde/es are more common for O2TP than for data warehousing environments. In data warehousing environments. suppose an application contains an ODD. and optionally compressing partitions. O2TP environments on the other hand mostly rely on global non4partitioned inde/es. * typical usage of partitioning for manageability is to support a 7rolling window7 load process in a data warehouse. thus dividing the maintenance process into more manageable chunks. Partition eliminationC is the simplest and also the most substantial means to improve performance using partitioning.
Oracle is using either the fact of already BphysicalC e6ui4partitioned tables for the .oins break a large . if one partition of a partitioned table is unavailable. If the table had # years of historical data. or parallel access method. partitioning can reduce scheduled downtime. and at least one of these tables is partitioned on the . This 6uery could potentially e/ecute 100/ faster simply because of partition pruning. all of the other partitions of the table remain online and available.oin techni6ue.ects in relatively small batch windows.oined tables.oins.oin in less time. This characteristic of partition independence can be an important part of a high4availability strategy.D. by using a techni6ue known as partition4wise .oins. thus ensuring that only a . Partitioning in Oracle Database 11g Page * . Partition pruning works with all of Oracle7s other performance features. completing the overall . Partition4wise .oin into smaller . Thus decreasing the system down4time. and then the inactive data in the other partitions could be recovered at a convenient time. the database could be recovered with .unction with any inde/ing techni6ue. Partition4wise . Oracle will utili:e partition pruning in con. independent of the other partitions in the table. Partition-wise Joins" Partitioning can also improve the performance of multi4table . and that this table has been partitioned by week.table. The performance gains provided by partitioning may enable database administrators to complete maintenance operations on large database ob. * 6uery re6uesting orders for a single week would only access a single partition of the ODD.oin or is transparently redistributing BF 8repartitioning9C one table at runtime to create e6ui4partitioned data sets matching the partitioning of the other table.oin of these 7identical7 data sets will produce a result and that other data sets do not have to be considered.oin.of orders.oins of 7identical7 data sets for the . and these database operations will run successfully if they do not need to access the unavailable partition. Therefore in the event of a disaster.oin key. <or e/ample.oins can be applied when two tables are being . (oreover.oined together.ust the partitions comprising of the active data.ects provide partition independence. 7Identical7 here is defined as covering e/actly the same set of partitioning key values on both sides of the . this 6uery would access one partition instead of 10E partitions. The application can continue to e/ecute 6ueries and transactions against this partitioned table. The database administrator can specify that each partition be stored in a separate tablespace5 this would allow the administrator to do backup and recovery operations on each individual partition. This offers significant performance benefits both for serial and parallel e/ecution. . Partitioning "or A)ailabilit& Partitioned database ob.
<*H2T7 partition can be defined to catch all values for a partition key that are not e/plicitly defined by any of the lists. <urthermore. a table can be partitioned either as single or composite partitioned table" "ingle #one-le$el% Partitioning:* table is defined by specifying one of the data distribution methodologies.OUR USINESS Oracle Database 11g provides the most comprehensive set of partitioning strategies.PARTITIONING – %ODE+ING !OR . Hsing the above4mentioned data distribution methods. * special 7D. The data distribution is a continuum without any holes and the lower boundary of a range is automatically defined by the upper boundary of the preceding range. increasing the fle/ibility for the partitioning key selection. the table is partitioned by data distribution method one and then each partition is Partitioning in Oracle Database 11g Page - . namely" ange: The data is distributed based on a range of values of the partitioning key Bfor a date column as the partitioning key. allowing a customer to optimally align the data subdivision with the actual business re6uirements. 2ist. hash does not provide any logical mapping between the data and any partition. and =ash partitioned tables. 7H-*7. <irst. and 7(e/ico7C.ects. List: The data distribution is defined by a list of values of the partitioning key Bfor a region column as the partitioning key. the 7Ganuary4 #00)7 partition contains rows with the partitioning4key values between 7014G*!4#00)7 and 7314G*!4#00)7C. Oracle provides a variety of partitioning extensions. the 7lessIthanIthousand7 partition contains rows where the following condition is true" &00 JF Partitioning key J1000. and advising on partitioning strategies for non4partitioned ob. !ash: * hash algorithm is applied to the partitioning key to determine the partition for a given row. *ll available partitioning strategies rely on fundamental data distribution methods that can be used for either single Bone4 levelC or composite partitioned tables. <or e/ample consider a table with a number column as the partitioning key and two partitions 7lessIthanIfiveIhundred7 and 7lessIthanIthousand7. the 7!orth *merica7 partition may contain values 7%anada7. Kou can specify Dange. Hnlike the other two data distribution methods. &omposite Partitioning: * combination of two data distribution methods are used to define a composite partitioned table. asic Partitioning Strategies Oracle Partitioning offers three fundamental data distributionmethods that control how the data is actually going to placed into the various individual partitions. using one or more columns as the partitioning key. providing automated partition creation as4needed.
< Partitioning on the other hand allows you to naturally partition tables according to the logical data model without re6uiring to store the partitioning key columns. range4range. Oracle provides partitioning e/tensions. D. D. <urthermore. thus reducing the manual overhead for denormali:ation and saving space. list4list. an interval partitioned table could be defined so that Oracle creates a new partition for every month in a calendar year5 a partition is then automatically created for 7-eptember #00)7 as soon as the first record for this month is inserted into the database. Interval partitioning e/tends the capabilities of the range method to define e6ui4 partitioned ranges using an interval definition./tend the fle/ibility in defining a partitioning key.oins for the e6ui4partitions of Partitioning in Oracle Database 11g Page / .ectives" BaC .further subdivided into subpartitions using a second data distribution method. Dather than specifying individual ranges e/plicitly. a range4hash composite partitioned table is first range4partitioned. Interval partitioning greatly improves the manageability of a partitioned table. <or e/ample. The e/tensions in Oracle Database 11g mainly focus on two ob. @ithout D. *ll sub4partitions for a given partition together represent a logical subset of the data.< Partitioning automatically enables partition4wise .tensions In addition to the basic partitioning strategies. hash. Inde/4organi:ed tables BIOTsC can be partitioned using range. Interval4 2ist. and list4hash. range4list. %omposite partitioning is not supported for IOTs. The partitioning strategy of the parent table is inherited to its child table without the necessity to store the parent7s partitioning key columns in the child table. Oracle will create any partition automatically as4needed whenever data for a partition is inserted for the very first time. Partitioning E.< Partitioning you have to duplicate all partitioning key columns from the parent table to the child table if you want to take advantage from the same partitioning strategy5 D. and then each individual range4 partition is further sub4partitioned using the hash partitioning techni6ue. *vailable composite partitioning techni6ues are range4hash. Interval4=ash. list4range. and Interval4Dange. BbC .nhance the manageability of a partitioned table significantly. '( Partitioning: Oracle Database 11g allows to partition a table by leveraging an e/isting parent4child relationship. The available techni6ues for an interval partitioned table are Interval. <or e/ample. The e/tensions are namely" Inter$al Partitioning: * new partitioning strategy in Oracle Database 11g.< Partitioning also transparently inherits all partition maintenance operations that change the logical shape of a table from the parent table to the child table. and list partitioning.
@ith the e/tension of partitioning advice. thus enabling a more comprehensive match of the business re6uirements. column but can be partitioned by reference to the ODD. removes that restriction and allows the partitioning key to be defined by an e/pression.table. and storing the e/pression as metadata only. is part of Oracle7s Tuning Pack. e6ui4partitioned to the parent table ODD.(.does not contain the ODD.table.D-. all order items for orders in 7Gan4#00)7 will then be stored in a single partition in the ODD.table containing a column *%%OH!TIID can be e/tended with a virtual BderivedC column *%%OH!TI'D*!%= that is derived from the first three digits of the *%%OH!TIID column which becomes the partitioning key for this table.D.D IT. improving the performance for this operation. Lirtual columns.(. The Partition *dvisor. Partitioning in Oracle Database 11g Page 11 . It can be used from within . a parent table ODD.table Oracle will transparently add the e6uivalent partition to the ODD. It is not uncommon to see columns being overloaded with information5 for e/ample a 10 digit account ID can include an account branch information as the leading three digits. @ith the e/tension of virtual column4 based Partitioning.nterprise (anager or via a command line interface.DID*T. a new functionality in Oracle Database 11g. Lirtual column4based Partitioning is supported with all basic partitioning strategies.< Partitioning.D.is Dange partitioned on the ODD. a table could only be partitioned if the partitioning key physically e/isted in the table. Partitioning has been enhanced to allow a partitioning strategy being defined on virtual columns. The generated script can either be implemented manually or submitted onto a 6ueue within Oracle .Dtable is partitioned by month.(.D. Decommendations generated by the ->2 *ccess *dvisor $ either for Partitioning only or holistically 4 will show the anticipated performance gains that will result if they are implemented. customers not only can get recommendation specifically for partitioning but also a more comprehensive holistic recommendation of ->2 *ccess *dvisor.the parent and child table. integrated into the ->2 *ccess *dvisor. <or e/ample.nterprise (anager. materiali:ed views and materiali:ed view logs. in addition to the ones it already provides for inde/es. the *%%OH!T. an e/tra licensable option. If the ODD. column5 its child table ODD. If a partition 7<eb4#00)7 is added to the ODD.D IT. Partition A0)isor The ->2 *ccess *dvisor in Oracle Database 11g has been enhanced to generate partitioning recommendations.DID*T.D IT.table. improving the collective performance of ->2 statements overall. )irtual column-based Partitioning" In previous versions of Oracle. using one or more e/isting columns of a table. *ll basic partitioning strategies are available for D.
-!.tensions at a Glance The following table gives a conceptual overviewof all available basic partitioning strategies in Oracle Database 11g" Partitioning Strategy Range Partitioning List Partitioning Has Partitioning Composite Partitioning Range!Range Range!List Range!Has List!List List!Range List!Has Data Distribution Based on consecutive ranges of values. Column order_date is only present in t e parent orders table Orders table as a virtual column t at derives t e sales region based on t e first t ree digits of t e customer account number. Based on a as algorit m. Defined by one of t e above! mentioned partition tec ni#ues and t e partitioning 2ey is based on a virtual column. Oracle Database 11g provides the following partitioning e/tensions" Partitioning &'tension %nterval Partitioning %nterval %nterval!Range %nterval!List %nterval!Has Partitioning (ey )n e'tension to Range Partition. Defined by an interval$ providing e#ui!"idt ranges. 4 e partitioning 2eys are not stored in actual columns in t e c ild table.0+ R&1 Partitioning 5Parent6 Orders table range partitioned by order_date and in erits t e partitioning tec ni#ue to 5c ild6 order lines table. 4 e orders table is t en list partitioned by sales region. Partitioning for a c ild table is in erited from t e parent table t roug a primary 2ey 3 foreign 2ey relations ip. Based on a combination of t"o of t e above!mentioned basic tec ni#ues of Range$ List$ Has $ and %nterval Partitioning Sample Business Case Orders table range partitioned by order_date Orders table list partitioned by country Orders table as partitioned by customer_id Orders table is range partitioned by order_date and sub!partitioned by as on customer_id Orders table is range partitioned by order_date and sub!partitioned by range on s ipment_date In addition to the available partitioning strategies. 7irtual column based Partitioning Partitioning in Oracle Database 11g Page 11 . *it t e e'ception of t e first partition all partitions are automatically created on! demand " en matc ing data arrives. 7irtual columns are not stored on dis2 and only e'ist as metadata. Sample Business Case Orders table partitioned by order_date "it a predefined daily interval$ starting "it +.an!/. Based on unordered lists of values.Partitioning Strategies an0 E..
performance. it can be easily implemented because no costly and time4consuming application changes are re6uired. show you how to partition the table and advise when it is time to move partitions to other storage tiers. CONC+USION %onsidering the new and improved functionality for Oracle Partitioning. Partitioning in Oracle Database 11g Page 12 . the importance 4 and access pattern $ of the data heavily relies on the age of the data5 Partitioning enables individual partitions Bor groups of partitionsC to be stored on different storage tiers. Oracle Database 11g is the most significant release since the introduction of Oracle Partitioning in 1.. The Oracle I2( *ssistant which is a freely available tool downloadable from OT!. the storage costs are reduced by factors Bcost savings of &0M or more are not uncommonC. -ince partitioning is transparent to the application.0M of the dataC on an ine/pensive low cost storage tier. can illustrate those cost savings. <or e/ample an Orders table containing # years worth of data could have only the most recent 6uarter being stored on an e/pensive high4end storage tier and keep the rest of the table Balmost . enhancing the scalability. Oracle has enhanced the functionality of Partitioning. and availability of almost any database application. In every ma. without impacting the end user access. Through Oracle Partitioning.or release. or e/tending the manageability and maintenance capabilities. The independence of individual partitions is the key enabler for addressing the online portion of a 8tiered archiving9 strategy. Oracle plans to continue to add new partitioning techni6ues to ensure that an optimal partitioning techni6ue is available for every business re6uirement. providing different physical attributes and price points. Partitioning can be applied to cutting4edge applications and indeed partitioning can be a crucial technology ingredient to ensure these applications success. -pecifically in tables containing historical data. Oracle Partitioning can greatly enhance the manageability.C+E %ANAGE%ENT 2IT3 PARTITIONING Today7s challenge of storing vast 6uantities of data for the lowest possible cost can be optimally addressed using Oracle Partitioning. by either adding new partitioning techni6ues. thus optimi:ing the cost of ownership for the stored information. Partitioning can also be applied to more commonplace database applications in order to simplify the administration and costs of managing such applications.IN!OR%ATION +I!EC. Partitioning is for everybody.).
:6et6er e.7resse0 orall& or i'7lie0 in la:. :it6o5t o5r 7rior :ritten 7er'ission< Oracle is a registere0 tra0e'ar9 o" Oracle Cor7oration an0Aor its a""iliates< Ot6er na'es 'a& be tra0e'ar9s o" t6eir res7ecti)e o:ners< . nor s5b?ect to an& ot6er :arranties or con0itions. electronic or 'ec6anical.: =1<($1<$1(<*211 oracle<co' Co7&rig6t > 211*. Oracle< All rig6ts reser)e0< T6is 0oc5'ent is 7ro)i0e0 "or in"or'ation 75r7oses onl& an0 t6e contents 6ereo" are s5b?ect to c6ange :it6o5t notice< T6is 0oc5'ent is not :arrante0 to be error@"ree.Partitioning in Oracle Database 11g 45ne 211* A5t6or: 3er'ann aer Contrib5ting A5t6ors: Oracle Cor7oration 2orl0 3ea085arters $11 Oracle Par9:a& Re0:oo0 S6ores. "or an& 75r7ose. CA /#1($ U<S<A< 2orl0:i0e In85iries: P6one: =1<($1<$1(<*111 !a. incl50ing i'7lie0 :arranties an0 con0itions o" 'erc6antabilit& or "itness "or a 7artic5lar 75r7ose< 2e s7eci"icall& 0isclai' an& liabilit& :it6 res7ect to t6is 0oc5'ent an0 no contract5al obligations are "or'e0 eit6er 0irectl& or in0irectl& b& t6is 0oc5'ent< T6is 0oc5'ent 'a& not be re7ro05ce0 or trans'itte0 in an& "or' or b& an& 'eans.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.