Temporary table spaces hold temporary data required by the database manager when performing operations such as sorts or joins, since these activities require extra space to process the results set.
A database must have at least one system temporary table space with the same page size as the catalog table space. By default, one system temporary table space called TEMPSPACE1 is created at database creation time. IBMTEMPGROUP is the default database partition group for this table space. The page size for TEMPSPACE1 is whatever was specified when the database itself was created (by default, 4 kilobytes).
User temporary table spaces hold temporary data from tables created with a DECLARE GLOBAL TEMPORARY TABLE or CREATE GLOBAL TEMPORARY TABLE statement. User temporary table spaces are not created by default at the time of database creation. They also hold instantiated versions of created temporary tables.
You can also reorganize without a temporary table space by reorganizing the table directly in the same table space. This type of reorganization requires that there be extra space in the table space(s) of the table for the reorganization process.
Automatic storage temporary table spaces, like regular and large automatic storage table spaces, are associated with storage groups. However, automatic storage temporary table spaces cannot change their storage group association. If a rebalance operation is attempted on an automatic storage temporary table space, SQL0109N is returned. To associate a temporary table space with a storage group, you can drop the temporary table space and re-create it using a different storage group. If you add storage paths to a storage group, temporary table spaces do not take advantage of the new paths until the next database activation.