SQL Server 2005 でのパフォーマンス問題のトラブルシューティング
select
scheduler_id,
current_tasks_count,
runnable_tasks_count
from
sys.dm_os_schedulers
where
scheduler_id < 255
select top 50
sum(qs.total_worker_time) as total_cpu_time,
sum(qs.execution_count) as total_execution_count,
count(*) as number_of_statements,
qs.plan_handle
from
sys.dm_exec_query_stats qs
group by qs.plan_handle
order by sum(qs.total_worker_time) desc
select
scheduler_id,
current_tasks_count,
runnable_tasks_count
from
sys.dm_os_schedulers
where
scheduler_id < 255
select top 50
sum(qs.total_worker_time) as total_cpu_time,
sum(qs.execution_count) as total_execution_count,
count(*) as number_of_statements,
qs.plan_handle
from
sys.dm_exec_query_stats qs
group by qs.plan_handle
order by sum(qs.total_worker_time) desc
SQL Server クエリ待機の状況を確認する - 戦艦ゆにっき
1.select
2. wait_type as '待機の種類',
3. waiting_tasks_count as '待機数',
4. wait_time_ms as '総待機時間',
5. max_wait_time_ms as '最大待機時間',
6. signal_wait_time_ms as '準備時間'
7.from sys.dm_os_wait_stats
8.order by wait_time_ms desc
1.select
2. wait_type as '待機の種類',
3. waiting_tasks_count as '待機数',
4. wait_time_ms as '総待機時間',
5. max_wait_time_ms as '最大待機時間',
6. signal_wait_time_ms as '準備時間'
7.from sys.dm_os_wait_stats
8.order by wait_time_ms desc