Sunday, December 28, 2008

Tablespace Creation and parameters used

Explanation for all parameters used during tablespace creation:


CREATE TABLESPACE TSNAME

IN DBNAME

USING STOGROUP STGNAME

PRIQTY 40012 --> Primary quantity. Space allocated once the create statement is executed.

SECQTY 8004 --> Seconday quantity. Space allocated only when primary quantity is fully used.

ERASE NO --> Specifies whether data in the table should be erased or overwritten by binary zeroes when the TS is dropped

FREEPAGE 5 --> Allocated an empty page after every 5 data pages. Freepage will be used during INSERTS and UPDATES to place new records close to related records

PCTFREE 10 --> Percentage of space left free per page. Freespace will be used during INSERS and UPDATES to place new records close to related records and avoid page splits.


TRACKMOD YES --> specifies whether DB2 tracks modified pages in the space map pages in the table space or partition. This information will be used during incremental image copy creation.

SEGSIZE 64 --> specifies the number of pages in a segment for segmented table spaces.

BUFFERPOOL BP0 --> specifies which buffer pool the table space is assigned to.Decides the pagesize of the TS

LOCKSIZE ANY --> specifies the size of locks used within the table space . The allowable lock sizes are ANY, TABLESPACE,TABLE,PAGE and ROW. For ANY , DB2 choose an optimal lock on its own depending on the amount of records locked.

LOCKMAX SYSTEM --> Specifies maximum number of locks on an object. In this case it takes the value of SYSTEM which is a DB2ZPARM.

CLOSE NO --> Specifies whether underlying VSAM data sets for the TS should be closed each time after use or not.

COMPRESS NO -->specifies whether data compression is used for rows in the table space

CCSID EBCDIC --> data encoding scheme.

DEFINE YES --> specify an TS and defer the physical creation. The data sets will not be created until data is inserted into the TS. This option is helpful in order to reduce the number of physical data sets.

MAXROWS 255; -->specifies the maximum number of rows allowed on a page, up to a maximum of 255.

COMMIT;

No comments:

Post a Comment