Task-to-engine affinity

In a multiengine environment, any available engine can process the next task in the global run queue. The engine affinity attribute lets you assign a task to an engine or to a group of engines (in threaded mode, this is done with thread pools).

To organize task-to-engine affinity:

EC1 and EC2 do not set engine affinity for the execution object; however, EC3 sets affinity to the Adaptive Server engine with the highest engine number in the current configuration.

Use sp_addengine to create engine groups and sp_addexeclass to bind execution objects to an engine group. If you do not want to assign engine affinity for a user-defined execution class, use ANYENGINE as the engine group parameter.

In threaded mode, use create thread pool to create a new thread pool. Use sp_addexeclass to bind execution objects to thread pools.

NoteThe engine affinity attribute is not used for stored procedures.