Joined: 08 Oct 2004 Posts: 274 Topics: 52 Location: California
Posted: Tue Feb 27, 2007 1:08 pm Post subject: Partioned Table V8
In reading the IBM doc on partioned tables, tablespaces, and indexes it states as of V8 you can create partions in the DDL, but I can't find an example. currently I have created partitioned tables like this:
Code:
CREATE TABLESPACE FTSCLMSP
IN FDBMD
USING STOGROUP FSGALLP
PRIQTY 35000
SECQTY 12500
ERASE NO
COMPRESS YES
NUMPARTS 3
LOCKSIZE ANY LOCKMAX SYSTEM
BUFFERPOOL BP10
CLOSE NO;
CREATE TABLE FDBMD.CLAIM_MASTER
(CLAIM_ID INTEGER GENERATED BY DEFAULT AS IDENTITY
(START WITH 0 ,
INCREMENT BY 1 ,
CYCLE ,
MINVALUE -2147483648 ,
MAXVALUE 2147483647) ,
PROV_ID INTEGER ,
USERID VARCHAR (040) NOT NULL,
LASTUPDT TIMESTAMP NOT NULL,
PRIMARY KEY (CLAIM_ID))
IN FDBMD.FTSCLMSP
;
CREATE UNIQUE INDEX FDBMD.XCLMST1
ON FDBMD.CLAIM_MASTER
(CLAIM_ID)
CLUSTER
(PART 1 VALUES (1000000)
USING STOGROUP FSGALLP
PRIQTY 2500
SECQTY 1000
ERASE NO,
PART 2 VALUES (2000000)
USING STOGROUP FSGALLP
PRIQTY 2500
SECQTY 1000
ERASE NO,
PART 3 VALUES (3000000)
USING STOGROUP FSGALLP
PRIQTY 2500
SECQTY 1000
ERASE NO)
BUFFERPOOL BP11
COPY YES
CLOSE NO
DEFER NO;
Is this the best way? Or should I be creating the partions in the table DDL? _________________ Thanks,
NASCAR9
Joined: 08 Oct 2004 Posts: 274 Topics: 52 Location: California
Posted: Tue Feb 27, 2007 2:56 pm Post subject:
kolusu,
Thanks for the response. This is very similiar to the way I was/am doing the tablespace, DDL, and index.
The IBM doc(V8) it talks about partion varibles in the 'Create Table' statment. Was hoping for an example of the 'Create Table' with the partion varibles. _________________ Thanks,
NASCAR9
Joined: 08 Oct 2004 Posts: 274 Topics: 52 Location: California
Posted: Thu Mar 01, 2007 10:45 am Post subject:
I'm currently reading Redbook 'DB2 UDB for z/OS Version 8: Everything You Wanted to Know, ...and More'. Better examples then the SQL Reference doc. Also a comparison of V8 to V7 and earlier. _________________ Thanks,
NASCAR9
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum