Table space
types
A database must contain at
least three types table spaces: one catalog table space, one or more user table
spaces, and one or more temporary table spaces.
First is regular
These are for user tables.
For example, the USERSPACE1 table space created by default is a regular table space.
Large
These are used to optionally
separate LOB data into its own table space. It is also used for storing XML data for databases created with pureXML support using the
XML data type for columns. Large table spaces are the default.
Temporary
There are two type of
temporary table First is System temporary and second is user temporary
System temporary
These are used by DB2 for
internal operations, such as sorts. For example, the TEMPSPACE1 table space,
created by default when you create a database, is a system temporary table
space. There must always be at least one system temporary table space.
User Temporary
These are used to create user
- defined Declared Global Temporary Tables and Create Global Temporary Tables
which are temporary in - memory tables, They are often confused with system temporary table spaces. Users must create a user temporary table space
before or can be used.
There are two types of table space, both of
which can be used in a single database: - System managed space, in
which the operating system's file manager controls the storage space.
- database managed space, in
which the database manager controls the storage space.
catalog partition will contain all three default table spaces,
and the other database partitions will each contain only TEMPSPACE1 and
USERSPACE1.