Where database server-created temporary tables are stored
When the database server creates a temporary table, it stores the temporary table in one of the dbspaces that you specify in the DBSPACETEMP configuration parameter or the DBSPACETEMP environment variable. The environment variable supersedes the configuration parameter.
When you do not specify any temporary dbspaces in DBSPACETEMP,
or the temporary dbspaces that you specify have insufficient space,
the database server creates the table in a standard dbspace according
to the following rules:
- If you created the temporary table with CREATE TEMP TABLE, the database server stores this table in the dbspace that contains the database to which the table belongs.
- If you created the temporary table with the INTO TEMP option of the SELECT statement, the database server stores this table in the root dbspace.
For more information, see Creating a temporary dbspace.