Skip to content

Commit

Permalink
Merge pull request #386 from erikdarlingdata/dev
Browse files Browse the repository at this point in the history
Update sp_PressureDetector.sql
erikdarlingdata authored Mar 26, 2024
2 parents 1428907 + e09c3b7 commit 5b62c93
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sp_PressureDetector/sp_PressureDetector.sql
Original file line number Diff line number Diff line change
@@ -760,8 +760,6 @@ OPTION(MAXDOP 1, RECOMPILE);',
SELECT
w.wait_type,
w.description,
sample_seconds =
DATEDIFF(SECOND, w.sample_time, w2.sample_time),
sample_cpu_time_seconds =
(w2.hours_cpu_time - w.hours_cpu_time) / 1000.,
wait_time_seconds =
@@ -793,7 +791,9 @@ OPTION(MAXDOP 1, RECOMPILE);',
),
N'.00',
N''
)
),
sample_seconds =
DATEDIFF(SECOND, w.sample_time, w2.sample_time)
FROM @waits AS w
JOIN @waits AS w2
ON w.wait_type = w2.wait_type
@@ -1109,8 +1109,6 @@ OPTION(MAXDOP 1, RECOMPILE);',
f.database_name,
f.database_file_details,
f.file_size_gb,
sample_seconds =
DATEDIFF(SECOND, f.sample_time_o, f.sample_time_t),
f.avg_read_stall_ms,
f.avg_write_stall_ms,
f.total_read_stall,
@@ -1147,7 +1145,9 @@ OPTION(MAXDOP 1, RECOMPILE);',
),
N'.00',
N''
)
),
sample_seconds =
DATEDIFF(SECOND, f.sample_time_o, f.sample_time_t)
FROM f
WHERE f.total_read_count > 0
OR f.total_write_count > 0
@@ -1299,7 +1299,7 @@ OPTION(MAXDOP 1, RECOMPILE);',
total_difference_per_second =
FORMAT((dopc2.cntr_value - dopc.cntr_value) /
DATEDIFF(SECOND, dopc.sample_time, dopc2.sample_time), 'N0'),
sample_difference_seconds =
sample_seconds =
DATEDIFF(SECOND, dopc.sample_time, dopc2.sample_time),
first_sample_time =
dopc.sample_time,
@@ -1323,7 +1323,7 @@ OPTION(MAXDOP 1, RECOMPILE);',
p.second_cntr_value,
p.total_difference,
p.total_difference_per_second,
p.sample_difference_seconds
p.sample_seconds
FROM p
ORDER BY
p.object_name,

0 comments on commit 5b62c93

Please sign in to comment.