The following example illustrates how to assign preferred access to resources to an execution object by associating it with EC1. In this case, the execution object is a combination of application and login.
The syntax for the sp_bindexeclass is:
sp_bindexeclass object_name, object_type, scope, class_name
Suppose you decide that the “sa” login must get results from isql as fast as possible. You can tell Adaptive Server to give execution preference to login “sa” when it executes isql by issuing sp_bindexeclass with the preferred execution class EC1. For example:
sp_bindexeclass sa, LG, isql, EC1
This statement stipulates that whenever a login (LG) called “sa” executes the isql application, the “sa” login task executes with EC1 attributes. Adaptive Server improves response time for the “sa” login by:
Placing it in a high-priority run queue, so it is assigned to an engine more quickly
Allowing it to run for a longer period of time than the default value for time slice, so it accomplishes more work when it has access to the engine