Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Effect of Configuration on I/O Activity >

Configuring Dbspaces for Temporary Tables and Sort Files

Applications that use temporary tables or large sort operations require a large amount of temporary space. To improve performance of these applications, use the DBSPACETEMP configuration parameter or the DBSPACETEMP environment variable to designate one or more dbspaces for temporary tables and sort files.

Depending on how the temporary space is created, the database server uses the following default locations for temporary table and sort files when you do not set DBSPACETEMP:

Warning:
If you do not specify a value for the DBSPACETEMP configuration parameter or the DBSPACETEMP environment variable, the database server uses this operating-system file for implicit temporary tables. If this file system has insufficient space to hold a sort file, the query performing the sort returns an error. Meanwhile, the operating system might be severely impacted until you remove the sort file.

You can improve performance with the use of temporary dbspaces that you create exclusively to store temporary tables and sort files. It is recommended that you use the DBSPACETEMP configuration parameter and the DBSPACETEMP environment variable to assign these tables and files to temporary dbspaces.

When you specify dbspaces in either the DBSPACETEMP configuration parameter or the DBSPACETEMP environment variable, you gain the following performance advantages:

Statement That
Creates Temporary
Table
Database Logged WITH NO LOG clause FRAGMENT BY
clause
Where Temp Table
Created
CREATE TEMP TABLE Yes No No Root dbspace
CREATE TEMP TABLE Yes Yes No One of dbspaces specified in DBSPACETEMP
CREATE TEMP TABLE Yes No Yes Cannot create temp table. Error 229/196
Important:
It is recommended that you use the DBSPACETEMP parameter or the DBSPACETEMP environment variable for better performance of sort operations and to prevent the database server from unexpectedly filling file systems. The dbspaces that you list must be composed of chunks that are allocated as unbuffered devices.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]