Personal tools
You are here: Home Forums DB2 implementation of table partitioning
Navigation
Log in


Forgot your password?
 
Document Actions

implementation of table partitioning

Up to DB2

implementation of table partitioning

Posted by Pawan at May 06. 2009

Hi All,


          Please share exp of table partitioning implementation.


 


Thanks


Pawan


Re: implementation of table partitioning

Posted by perallis at May 06. 2009

Hello Pawan,

For example, the following statement creates a table where rows with fired ≥  2009-01-01 and fire ≤ 2009-01-31 are in PART0 (the first data partition), rows with 2009-01-02 ≤ fired ≤  2009-02-29 are in PART1 (the second data partition), up to 2010-12-01 ≤ fired ≤ 2010-12-31 are in PART24 (the last data partition).


CREATE TABLE tableX(COD INT, fired date) in tspace1, tspace2 

    PARTITION BY RANGE (fired) (STARTING FROM ('2009-01-01')
    ENDING AT (2010-12-31) EVERY 1 MONTH)

 


See more details in the links below:
How to attach a new table in a partitioned table
How to detach a partition in a patitioned table
How to create partitioned tables on DB2 v9


 


Regards,
Perallis


Powered by Ploneboard
Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls