CREATE TABLESPACE statement
The CREATE TABLESPACE statement defines a new table space to a Db2 system.
CREATE TABLESPACE databaseName.tableSpaceName | This option specifies the fully qualified name of the table space to be created. | ||||||||
---|---|---|---|---|---|---|---|---|---|
LARGE | This option indicates whether the table space is a LARGE table space. LARGE parameter values
| ||||||||
LOB | This option indicates whether the table space is a nonpartitioned table space that contains the data for a large object (LOB) column in an auxiliary table. LOB parameter values
| ||||||||
OWNER authorizationID | This option specifies the owner of the table space. | ||||||||
DSSIZE integer G | This option specifies the maximum size for each table space partition in gigabtyes. | ||||||||
PAGENUM | This option specifies the page numbering used for the partition-by-range table space. PAGENUM parameter values
| ||||||||
MEMBER CLUSTER | This option indicates whether inserted data is clustered by the clustering index. MEMBER CLUSTER parameter values
| ||||||||
NUMPARTS number | This option specifies the number of partitions for a table space. NUMPARTS 0 specifies a nonpartitioned table space. | ||||||||
NUMPARTS number PART number tableSpacePartitionParameters | This option specifies each partition of the table space according to the partition number and tableSpacePartitionParameters (see tableSpacePartitionParameters). If PART 64 (or greater) is specified, a LARGE table space is created, even if the LARGE keyword is not specified. | ||||||||
PART 0 tableSpacePartitionParameters | This option specifies a nonpartitioned table space according to tableSpacePartitionParameters (see tableSpacePartitionParameters). | ||||||||
LOCKPART | This option indicates whether selective partition locking is used when locking a partitioned table space. LOCKPART parameter values
| ||||||||
INSERT ALGORITHM | This option specifies the insert algorithm used for inserting rows into tables in a MEMBER CLUSTER UTS table space.
|
tableSpacePartitionParameters
tableSpacePartitionParameters uses the following parameters:
VCAT catalogName | This option specifies the volume catalog to be used for the table space. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
STOGROUP | This option specifies the new default storage group for the table space. STOGROUP parameter values
| ||||||||||||
FREEPAGE number | This option specifies that a free page is added after every number of pages upon table space creation or reorganization. | ||||||||||||
PCTFREE number | This option specifies the percentage of free space left on each page of the table space upon creation or reorganization. PCTFREE parameter values
| ||||||||||||
DSSIZE integer G | This option specifies the maximum size for the table space partition in gigabtyes. | ||||||||||||
TRACKMOD | This option indicates whether modified pages are tracked in the space map pages of the table space. TRACKMOD parameter values
| ||||||||||||
COMPRESS | This option indicates whether rows in the table space or partition are compressed. COMPRESS parameter values
| ||||||||||||
GBPCACHE | This option specifies which pages are cached to the group buffer pool for this partition. GBPCACHE parameter values
|
tableSpaceOptionstableSpaceOptions includes the following parameters:
BUFFERPOOL | This option specifies the new default buffer pool for the database for the creation of the table space. If the BUFFERPOOL keyword is not specified, the Db2 default value is used. BUFFERPOOL parameter values
| ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LOCKSIZE | This option specifies the size of the locks for the table space. LOCKSIZE parameter values
| ||||||||||||||
LOCKMAX | This option specifies the maximum number of locks for the table space. LOCKMAX parameter values
| ||||||||||||||
CLOSE | This option indicates whether the index for the table space can be closed when the index is not being used. CLOSE parameter values
| ||||||||||||||
MAXPARTITIONS integer | This option specifies the maximum number of partitions in a partition-by-growth table space. The valid range of values is 1 through 4096. | ||||||||||||||
CCSID | This option specifies the encoding scheme of the table space. CCSID parameter values
| ||||||||||||||
MAXROWS integer | This option specifies the maximum number of rows per page for the table space. The valid range of values is 1 through 255. This parameter does not apply to LOB table spaces. | ||||||||||||||
LOG | This option indicates whether changes to data in a table space are written to a log. LOG parameter values
| ||||||||||||||
DEFINE | This option indicates when the data sets for the table space are created. DEFINE parameter values
| ||||||||||||||
SEGSIZE number | This option specifies the number of pages for each segment of a segmented table space. SEGSIZE 0 specifies a unsegmented table space. |
Related topic