Sybase IQ offers the following options to help you manage thread usage.
To set the maximum number of threads available for Sybase IQ use, set the server start-up option -iqmt. The default value is calculated from the number of connections and the number of CPUs and is usually adequate.
To set the stack size of the internal execution threads in the server, set the server start-up option -iqtss. The default value is generally sufficient, but may be increased if complex queries return an error indicating that the depth of the stack exceeded this limit. For details about -iqmt and -iqtss, see Chapter 1, “Running the Database Server,” Utility Guide.
To set the maximum number of threads a single user will use, issue the command SET OPTION MAX_IQ_THREADS_PER_CONNECTION. Some operations try to allocate and use a “team” of threads. To set then number of threads available to a “team”, issue the command SET OPTION MAX_IQ_THREADS_PER_TEAM. These options can be used to control the amount of resources a particular operation consumes. For example, the DBA can set this option before issuing an INSERT ,LOAD , BACKUP, or RESTORE command.