suspended
The session is waiting for an event, such as I/O, to complete.
Detailed Description​
More information can be gained on the thread state by using the sys.dm_os_worker
DMV
The state
field in this view can be one of the following values.
INIT
= Worker is currently being initialized.
RUNNING
= Worker is currently running either nonpreemptively or preemptively.
RUNNABLE
= The worker is ready to run on the scheduler.
SUSPENDED
= The worker is currently suspended, waiting for an event to send it a signal.
How to reduce this wait​
You can use the following query to find out how long a worker has been running in a SUSPENDED or RUNNABLE state.
SELECT t1.session_id, CONVERT(varchar(10), t1.status) AS status, CONVERT(varchar(15), t1.command) AS command, CONVERT(varchar(10), t2.state) AS worker_state, w_suspended = CASE t2.wait_started_ms_ticks WHEN 0 THEN 0 ELSE t3.ms_ticks - t2.wait_started_ms_ticks END, w_runnable = CASE t2.wait_resumed_ms_ticks WHEN 0 THEN 0 ELSE t3.ms_ticks - t2.wait_resumed_ms_ticks END FROM sys.dm_exec_requests AS t1 INNER JOIN sys.dm_os_workers AS t2 ON t2.task_address = t1.task_address CROSS JOIN sys.dm_os_sys_info AS t3 WHERE t1.scheduler_id IS NOT NULL;
Additional Links​
- SQL Server documentation - sys.dm_os_workers
- SQL Server documentation - Example worker thread state query
Search online​
If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.