Created
June 10, 2022 11:17
-
-
Save NaserKhoshfetrat/1e0f7e37b19d9e78c3280288d1fad541 to your computer and use it in GitHub Desktop.
sql server procedure performance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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