Limiting a query's temporary dbspace use

The QUERY_TEMP_SPACE_LIMIT option of the SET command lets you restrict the amount of temporary dbspace available to any one query. By default, a query can use 2000MB of temporary dbspace.

When you issue a query, Sybase IQ estimates the temporary space needed to resolve the query. If the total estimated temporary result space for sorts, hashes, and row stores exceeds the current QUERY_TEMP_SPACE_LIMIT setting, the query is rejected, and you receive a message such as:

Query rejected because it exceeds total space resource limit

If this option is set to 0, there is no limit, and no queries are rejected based on their temporary space requirements.