Skip to content

Instantly share code, notes, and snippets.

@NaserKhoshfetrat
Created June 10, 2022 11:17
Show Gist options
  • Save NaserKhoshfetrat/1e0f7e37b19d9e78c3280288d1fad541 to your computer and use it in GitHub Desktop.
Save NaserKhoshfetrat/1e0f7e37b19d9e78c3280288d1fad541 to your computer and use it in GitHub Desktop.
sql server procedure performance
-- sys.dm_os_performance_counters is a system Dynamic Management View (DMV) that returns one row for each SQL Server performance counter. It's useful for obtaining information about current performance counter values.
declare @cntr_value bigint
Select @cntr_value=cntr_value
from sys.dm_os_performance_counters
where instance_name='Fabrics' and
counter_name='Write Transactions/sec'
waitfor delay '00:00:01'
Select cntr_value -@cntr_value
from sys.dm_os_performance_counters
where instance_name='Fabrics' and
counter_name='Write Transactions/sec'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment