Storage options for temporary tables

Use the Storage Options segment of the CREATE TEMP TABLE statement to specify the storage location and distribution scheme for the table. This is an extension to the ANSI/ISO standard for SQL syntax.

(1)
Storage Options

1  IN
2.1 dbspace
2.1  extspace
1  %FRAGMENT BY Clause1
2?  %PUT Clause2
2?  %EXTENT SIZE Options3
Element Description Restrictions Syntax
dbspace Dbspace or temporary dbspace in which to store the temporary table. Must already exist Identifier
extspace Name that onspaces assigned to a storage area outside the database server Must already exist See documentation for access method.

Only temporary tables that include BLOB or CLOB columns can include the PUT clause as a storage option.

If you specify a temporary dbspace after the IN keyword, the database server does not perform any logical logging nor physical logging of the temporary table. You cannot mirror a temporary dbspace.

If you specify no extent size option, the default extent size is 8 pages.

To create a fragmented, unique index on a temporary table, you must specify an explicit expression-based distribution scheme for a temporary table in the CREATE TEMP TABLE statement. (Fragmentation of the index by ROUND ROBIN is not supported, and fragmentation by LIST or by INTERVAL is automatic, for a unique index on a table that uses a list or interval storage partitioning strategy.)