If the
column being partitioned is skewed (for example, by population within each state code), another
partitioning method may be more appropriate.
?–
?–
?–
558 Oracle Database 11g DBA Handbook
To use range partitioning, you must specify the following three criteria:
Partitioning method (range)
Partitioning column or columns
Bounds for each partition
In the following example, you want to partition the catalog request table CAT_REQ by season,
resulting in a total of four partitions per year:
create table cat_req
(cat_req_num number not null,
cat_req_dt date not null,
cat_cd number not null,
cust_num number null,
req_nm varchar2(50),
req_addr1 varchar2(75),
req_addr2 varchar2(75),
req_addr3 varchar2(75))
partition by range (cat_req_dt)
(partition cat_req_spr_2007
values less than (to_date('20070601','YYYYMMDD'))
tablespace prd01,
partition cat_req_sum_2007
values less than (to_date('20070901','YYYYMMDD'))
tablespace prd02,
partition cat_req_fal_2007
values less than (to_date('20071201','YYYYMMDD'))
tablespace prd03,
partition cat_req_win_2008
values less than (maxvalue)
tablespace prd04);
In the preceding example, the partitioning method is range, the partitioning column is REQ_
DATE, and the values less than clause specifies the upper bound that corresponds to the dates for
each season of the year: March through May (partition CAT_REQ_SPR_2007), June through August
(partition CAT_REQ_SUM_2007), September through November (partition CAT_REQ_FAL_2007),
and December through February (partition CAT_REQ_WIN_2008).
Pages:
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836