Вы находитесь на странице: 1из 6

Wait_Type

Area

Usage

Version

ASYNC_IO_COMPLETION

I/O

Resource

SQL 2005;SQL 2008

CHECKPOINT_QUEUE

Buffer

Background

SQL 2005;SQL 2008

CHKPT

Buffer

Background

SQL 2005; SQL 2008

CXPACKET

Query

Sync

SQL 2005;SQL 2008

DISKIO_SUSPEND

BACKUP

Sync

SQL 2005; SQL 2008

FT_IFTS_SCHEDULER_IDLE_WAIT

Full-Text

Background

SQL 2008

IO_COMPLETION

I/O

Resource

SQL 2005; SQL 2008

KSOURCE_WAKEUP

Shutdown

Background

SQL 2005;SQL 2008

LAZYWRITER_SLEEP

Buffer

Background

SQL 2005;SQL 2008

LOGBUFFER

Transaction Log

Resource

SQL 2005; SQL 2008

LOGMGR_QUEUE

Transaction Log

Background

SQL 2005; SQL 2008

MISCELLANEOUS

Ignore

Ignore

SQL 2005;SQL 2008

PREEMPTIVE_XXX

Varies

External

SQL 2008

REQUEST_FOR_DEADLOCK_SEARCH

Lock

Background

SQL 2008

RESOURCE_QUERY_SEMAPHORE_COMPILE

Query

Resource

SQL 2005; SQL 2008

RESOURCE_SEMAPHORE

Query

Resource

SQL 2005; SQL 2008

SOS_SCHEDULER_YIELD

SQLOS

Forced

SQL 2005;SQL 2008

SQLTRACE_BUFFER_FLUSH

Trace

Background

SQL 2005;SQL 2008

THREADPOOL

SQLOS

Resource

SQL 2005; SQL 2008

WRITELOG

I/O

Sync

SQL 2005; SQL 2008

XE_DISPATCHER_WAIT

XEvent

Background

SQL 2008

XE_TIMER_EVENT

XEvent

Background

SQL 2008

Description

Action

Used to indicate a worker is waiting on a asynchronous


Since this
I/O
is operation
used for various
to complete
reasonnot
youassociated
need to find
with
out
database
what query
pages
or task is associated with the wait. Tw

Used by background worker that waits on events


You
onshould
queue be
to process
able to safely
checkpoint
ignorerequests.
this one as
This
it is just
an "optional"
indicates the
waitcheckpoint
type see Important
background
Notes
worker
section
is wait
in b

Used to coordinate the checkpoint background You


worker
should
thread
be able
with to
recovery
safely ignore.
of master
Yousoshould
checkpoint
see 1 wait
won'tofstart
this type
accepting
for the
queue
server
requests
unless the
untilcheckpoint
master on

Used to synchronize threads involved in a parallel


You
query.
may not
Thisneed
wait to
type
take
only
anymeans
action.
a Ifparallel
you see
query
high iswait
executing.
times then it means you have a long running par

Used to indicate a worker is waiting to process I/O


Highforwait
a database
times here
or log
indicate
file associated
the SNAPSHOT
with aBACKUP
SNAPSHOT
mayBACKUP
be taking longer than expected. Typically the de
Used by a background task processing full-text search
You should
requests
be able
indicating
to safely
it isignore
waiting
unless
for some
work to
unexplained
do:
FTS issue. High wait times are normal

Used to indicate a wait for I/O for operation (typically


If wait synchronous)
times are high like
thensorts
you and
havevarious
a disk I/O
situations
bottleneck.
whereThe
theproblem
engine needs
will betodetermining
do a synchronous
what type
I/O of o

Used by the background worker "signal handler"You


which
should
waits
able
forto
a signal
safely to
ignore
shutdown
this wait.
SQLYou
Server
should only see one instance of this wait but in SQL Server 2

Used by the Lazywriter background worker to indicate


You should
it is sleeping
be able to
waiting
safelyto
ignore
wakethis
up and
one.check
The wait
for work
timesto
will
doappear to "cycle" as LazyWriter is designed

Used to indicate a worker thread is waiting for aThis


log is
buffer
typically
to write
a symptom
log blocks
of I/O
for bottlenecks
a transactionbecause other workers waiting on WRITELOG will hold on to

Used by the background worker "Log Writer" toYou


waitshould
on a queue
be able
fortorequests
safely ignore
to flush
thislog
wait
blocks
typetounless
the transaction
you believelog.
a problem
This is anexists
"optional"
in processing
wait type
logsee
blocI
This really should be called "Not Waiting".

This may have been used in SQL 2000 but for 2005/2008, it is not used for any valid wait. It is simply the de

Used to indicate a worker is running coded that Iiswill


notspecific
under the
PREEMPTIVE_XX
SQLOS Scheduling
wait Systems
types or groups of them in 2010. Be sure to read the Important Notes s

Used by background worker "Lock Monitor" to search


You should
for deadlocks.
be able to This
safely
is ignore
an "optional"
this onewait
as ittype
is just
seeand
Important
indication
Notes
the section
lock monitor
in blogthread is temporari

Used to indicate a worker is waiting to compile aThis


query
is a due
verytocomplicated
too many other
problem
concurrent
to explain.
query
Thecompilations
problem is more
that require
than just
"not
concurrent
small" amounts
compilations.
of memor
It is

High wait times indicate too many queries are running concurrently that require
query memory. Operations requiring query memory are hashes and sorts. Use DMVs
such
dm_exec_query_resource_semaphores
and dm_exec_query_memory_grants
Used to indicate a worker is waiting to be allowed
to as
perform
an operation requiring "query memory"
such as hashes and sorts

Used to indicate a worker has yielded to let other


This
workers
wait isrun
simply
on aanscheduler
indication that a worker yielded for someone else to run. High wait counts with low w
Used by background worker

You should be able to safely ignore unless some unexplained problem with SQLTrace files not getting writt

Indicates a wait for a task to be assigned to a worker


Look for
thread
symptoms of high blocking or contention problems with many of the workers especially if the wai

Indicates a worker thread is waiting for LogWriter


High
to waits
flush log
andblocks.
wait times indicate an I/O bottleneck on the storage system associated with the transaction

Used by a background worker to handle queue requests


You should
to write
be able
out
tobuffers
safely ignore
for async
thistargets
unless you believe a problem is occurring with processing of events

Used to indicate a background task is waiting forYou


"expired"
should timers
be ablefor
to internal
safely ignore
Xevent
this
engine
one. Just
workused by the Xevent engine for internal processing of its w

task is associated with the wait. Two examples of where this wait type is used is to create files associated with a CREATE DATABASE and for "zeroing" out a transaction lo

ckpoint background worker is waiting for work to do. I suppose if you thought you had issues with checkpoints not working or log truncation you might see if this worker
r the server unless the checkpoint worker crashed and had to be restarted.. If though this is technically a "sync" type of event I left its usage as Background

means you have a long running parallel query. I would first identify the query and determine if you need to tune it. Note sys.dm_exec_requests only shows the wait type o

ger than expected. Typically the delay is within the VDI application perform the snapshot backup.

High wait times are normal

will be determining what type of operation and where the bottleneck exists. For sorts, it is on the storage system associated with tempdb. Note that database page I/O d

nce of this wait but in SQL Server 2008 what will be unusual is the wait time will show up as 0 in sys.dm_os_wait_stats. Other DMVs like sys.dm_exec_requests will show

to "cycle" as LazyWriter is designed to sleep and wake-up every 1 second. Appears as LZW_SLEEP in Xevent

aiting on WRITELOG will hold on to log blocks. Look for WRITERLOG waiters and if found the overall problem is I/O bottleneck on the storage system associated with the t

roblem exists in processing log blocks to flush to the transaction log. This wait type is not a wait indicating I/O bottlenecks. It is only for waiting for other workers to reque

or any valid wait. It is simply the default wait in a list and isn't used to indicate any real waiting. This type shows up twice in sys.dm_os_wait_stats in SQL 2008 but the "ot

sure to read the Important Notes section for bug where this wait type is being over counted by the engine in some situations. Note also that when you see this wait_type

e lock monitor thread is temporarily sleeping before it wakes up to do work. This wait type should never exceed 5 seconds in one "wait" as this is the interval the lock mo

just concurrent compilations. It is the amount of memory required by the compilations. Typically this problem is not seen on 64bit systems. The biggest thing you can do

to run. High wait counts with low wait times usually mean CPU bound queries. High wait times here could be non-yielding problems

ith SQLTrace files not getting written to disk properly.

of the workers especially if the wait count and times are high. Don't jump to increase max worker threads especially if you use default setting of 0. This wait type will not

em associated with the transaction log

occurring with processing of events for async targets. Since this works on a queue you can have bursts of high wait times especially when no XEvent sessions are active.

gine for internal processing of its work. If something was possibly wrong with Xevent processing you might see if this thread ever "wakes up"

ASE and for "zeroing" out a transaction log file during log creation or growth.

og truncation you might see if this worker ever "wakes up". Expect higher wait times as this will only wake up when work to do

eft its usage as Background

exec_requests only shows the wait type of the request even if multiple tasks have different wait types. When you see CXPACKET here look at all tasks associated with the

h tempdb. Note that database page I/O does not use this wait type. Instead look at PAGEIOLATCH waits.

MVs like sys.dm_exec_requests will show the SIGNAL_HANDLER with a high wait time of this type.

n the storage system associated with the transaction log

nly for waiting for other workers to request log block flushes. Note that on SQL Server 2005 this wait type will not show up in sys.dm_exec_requests because the Log Wr

dm_os_wait_stats in SQL 2008 but the "other" instance is an older unused wait type in the code. We should be able to remove it.

ote also that when you see this wait_type in sys.dm_exec_requests the status of the request is RUNNING not SUSPENDED. This is because the engine doesn't really know

e "wait" as this is the interval the lock monitor wakes up to check for deadlocks

4bit systems. The biggest thing you can do is find out why you have so many compilations. Furthermore, a high amount of "query memory" can result in less memory ava

efault setting of 0. This wait type will not show up in sys.dm_exec_requests because it only occurs when the task is waiting on a worker thread. You must have a worker t

ally when no XEvent sessions are active.

T here look at all tasks associated with the request. Find the task that doesn't have this wait_type and see its status. It may be waiting on something else slowing down th

s.dm_exec_requests because the Log Writer task does not show up there.

s because the engine doesn't really know if the thread is waiting or running "external" code.

y memory" can result in less memory available for compilations so check what other users are consuming high query memory.

worker thread. You must have a worker to become a request. Furthermore, you may not see this "live" since there may be no workers to process tasks for logins or for q

aiting on something else slowing down the query. wait_resource also has interesting details about the tasks and its parallel query operator

workers to process tasks for logins or for queries to look at DMVs.

Вам также может понравиться