MAX_TEMP_SPACE_PER_CONNECTION Option

Limits temporary store space used per connection.

Allowed Values

Integer (number of MB)

Default

0 (no limit on temporary store usage)

Scope

Option can be set at the database (PUBLIC) or user level. When set at the database level, the value becomes the default for any new user, but has no impact on existing users. When set at the user level, overrides the PUBLIC value for that user only. No system privilege is required to set option for self. System privilege is required to set at database level or at user level for any user other than self.

Requires the SET ANY SYSTEM OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Description

By controlling space per connection, this option enables DBAs to manage the space for both loads and queries. If the connection exceeds the run time quota specified by MAX_TEMP_SPACE_PER_CONNECTION, SAP Sybase IQ rolls back the current statement and returns this message to the IQ message file or client user:

The current operation has been cancelled: Max_Temp_Space_Per_Connection exceeded

Conditions that may fill the buffer cache include read or write errors, lack of main or temp space, or being out of memory. SAP Sybase IQ may return the first error encountered in these situations and the DBA must determine the appropriate solution.

In a distributed query processing transaction, SAP Sybase IQ uses the values set for the QUERY_TEMP_SPACE_LIMIT and MAX_TEMP_SPACE_PER_CONNECTION options for the shared temporary store by limiting the total shared and local temporary space used by all nodes participating in the distributed query. This means that any single query cannot exceed the total temporary space limit (from IQ_SYSTEM_TEMP and IQ_SHARED_TEMP dbspaces), no matter how many nodes participate.

For example, if the limit is 100 and four nodes use 25 units of temporary space each, the query is within limits. If the sum of the total space used by any of the nodes exceeds 100, however, the query rolls back.

Examples

Set a 500GB limit for all connections:

SET OPTION 
PUBLIC.MAX_TEMP_SPACE_PER_CONNECTION = 512000

Set a 10TB limit for all connections:

SET OPTION 
PUBLIC.MAX_TEMP_SPACE_PER_CONNECTION = 10485760

Set a 5000MB limit for user wilson:

SET OPTION 
wilson.MAX_TEMP_SPACE_PER_CONNECTION = 5000
Related reference
QUERY_TEMP_SPACE_LIMIT Option