Átlagos tranzakció végrehajtási ideje:
1 2 3 |
select wait_type, waiting_tasks_count, wait_time_ms, wait_time_ms/waiting_tasks_count as 'time_per_wait' from sys.dm_os_wait_stats where waiting_tasks_count >0 and wait_type = 'HADR_SYNC_COMMIT' |
SQL szerver válasz ideje ms-ban:
wait_type | waiting_tasks_count | wait_time_ms | time_per_wait |
HADR_SYNC_COMMIT | 10809645 | 135666120 | 12 |
amennyiben néhány ms és potosabban szeretnénk, akkor:
select wait_type, waiting_tasks_count, wait_time_ms, cast( CAST ( wait_time_ms as float) / cast(waiting_tasks_count as float) AS DECIMAL(18,4) ) as ‘time_per_wait’
from sys.dm_os_wait_stats where waiting_tasks_count >0
and wait_type = ‘HADR_SYNC_COMMIT’