MAX_QUERY_TIME Option

Sets a time limit so that the optimizer can disallow very long queries.

Allowed Values

0 to 232 - 1 minutes

Default

0 (disabled)

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 PUBLIC OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Remarks

If the query runs longer than the MAX_QUERY_TIME setting, SAP Sybase IQ stops the query and sends a message to the user and the IQ message file. For example:

The operation has been cancelled -- Max_Query_Time exceeded.

MAX_QUERY_TIME applies only to queries and not to any SQL statement that is modifying the contents of the database.