Queries waiting in queue for processing are queued to run in order of the priority of the user who submitted the query, followed by the order in which the query was submitted. No queries are run from a lower priority queue until higher priority queries have all been executed.
The following options assign queries a processing priority by user.
IQGOVERN_PRIORITY assigns a numeric priority (1, 2, or 3, with 1 being the highest) to queries waiting in the processing queue.
IQGOVERN_MAX_PRIORITY allows the DBA to set an upper boundary on IQGOVERN_PRIORITY for a user or a group.
IQ_GOVERN_PRIORITY_TIME allows high priority users to start if a high priority (priority 1) query has been waiting in the -iqgovern queue for more than a designated amount of time.
To check the priority of a query, check the IQGovernPriority attribute returned by the sp_iqcontext stored procedure.