Use Hash Join Overflow and DBSPACETEMP

HCL OneDB™ uses an operating-system directory or file to direct any overflow that results from certain database operations, if you do not set the DBSPACETEMP environment variable or DBSPACETEMP configuration parameter.

You can specify the operating-system directory or file in the following ways:
  • SELECT statement with GROUP BY clause
  • SELECT statement with ORDER BY clause
  • Hash-join operation
  • Nested-loop join operation
  • Index builds

Location of the sort overflow files

The following table lists the environment variables and ONCONFIG configuration parameters that you can use to specify the location of the sort overflow files.
Table 1. Location of sort overflow files
Variable or Parameter Location of the sort overflow files
PSORT_DBTEMP environment variable The location specified in the environment variable
DBSPACETEMP environment variable The location specified in the environment variable
DBSPACETEMP configuration parameter specified in the ONCONFIG file The dbspace that is specified in the ONCONFIG file DBSPACETEMP configuration parameter
If more than one variable or parameter is specified, the priority by which the HCL OneDB determines the location of the sort overflow files is:
  1. PSORT_DBTEMP environment variable
  2. DBSPACETEMP environment variable
  3. DBSPACETEMP ONCONFIG variable
  4. DUMPDIR
  5. $ONEDB_HOME/tmp

If the environment variables or configuration parameter are not set, the sort overflow files are placed in the $ONEDB_HOME/tmp directory and the temporary tables are placed in the rootdbspace.