Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Hi,
I tried to Partition my table as below
CREATE TABLE
.
.
PARTITION BY (MY_DT ASC
,MY_NUM ASC )
(PARTITION 1 ENDING AT(9999,'2009-01-15')
,PARTITION 2 ENDING AT(9999,'2009-01-31')
,PARTITION 3 ENDING AT(9999,'2009-02-28')
,PARTITION 4 ENDING AT(9999,'2009-03-31')
,PARTITION 5 ENDING AT(9999,'2009-04-30')
,PARTITION 6 ENDING AT(9999,'2009-05-31')
)
I tried to load a data which spans through all the the 5 months and then tried running the REORG on the table.
When I checked number of records in each partition, to my suprise I found all the records loaded only in the first partition.
On the contrary I created the table as
CREATE TABLE
.
.
PARTITION BY (MY_NUM ASC
,MY_DT ASC )
(PARTITION 1 ENDING AT('2009-01-15',9999)
,PARTITION 2 ENDING AT('2009-01-31',9999)
,PARTITION 3 ENDING AT('2009-02-28',9999)
,PARTITION 4 ENDING AT('2009-03-31',9999)
,PARTITION 5 ENDING AT('2009-04-30',9999)
,PARTITION 6 ENDING AT('2009-05-31',9999)
)
When I tried loading the data which spans across all the 5 months to this table, the data based on the Partition boundar got loaded to the corresponding partition.
Can somebody please point why DB2 does this?? |
|