Where user-created temporary tables are stored

If your application lets you specify the location of a temporary table, you can specify either logging spaces or nonlogging spaces that you create exclusively for temporary tables.

For information about creating temporary dbspaces, see the onspaces topics in the HCL OneDB™ Administrator's Reference.

If you do not specify the location of a temporary table, the database server stores the temporary table in one of the spaces that you specify as an argument to the DBSPACETEMP configuration parameter or environment variable. The database server remembers the name of the last dbspace that it used for a temporary table. When the database server receives another request for temporary storage space, it uses the next available dbspace to spread I/O evenly across the temporary storage space.

For information about where the database stores temporary tables when you do not list any spaces as an argument to DBSPACETEMP, see the DBSPACETEMP section in the HCL OneDB Administrator's Reference.

When you use an application to create a temporary table, you can use the temporary table until the application exits or performs one of the following actions:
  • Closes the database in which the table was created and opens a database in a different database server
  • Closes the database in which the table was created
  • Explicitly drops the temporary table