Skip to content

Commit

Permalink
Merge pull request #341 from erikdarlingdata/dev
Browse files Browse the repository at this point in the history
WOOHOO!
  • Loading branch information
erikdarlingdata authored Jan 11, 2024
2 parents 9628a06 + 5a810e8 commit bdd6481
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 15 additions & 4 deletions sp_HealthParser/sp_HealthParser.sql
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CROSS APPLY wi.wait_info.nodes('//event') AS w(x)
WHERE w.x.exist('(action[@name="session_id"]/value/text())[.= 0]') = 0
AND w.x.exist('(action[@name="sql_text"]/value/text())') = 1
AND w.x.exist('(action[@name="sql_text"]/value/text()[contains(., "BACKUP")] )') = 0
AND w.x.exist('(data[@name="duration"]/value/text())[.>= sql:variable("@wait_duration_ms")]') = 1
AND NOT EXISTS
(
Expand Down Expand Up @@ -1052,9 +1053,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
tc.wait_type,
waits = SUM(CONVERT(bigint, tc.waits)),
total_wait_time_ms =
SUM
(
SUM(CONVERT(bigint, tc.waits)) *
AVG(tc.average_wait_time_ms)
CONVERT
(
bigint,
tc.waits *
tc.average_wait_time_ms
)
) + MAX(tc.max_wait_time_ms),
average_wait_time_ms = CONVERT(bigint, AVG(tc.average_wait_time_ms)),
max_wait_time_ms = CONVERT(bigint, MAX(tc.max_wait_time_ms))
Expand Down Expand Up @@ -1223,9 +1229,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
td.wait_type,
waits = SUM(CONVERT(bigint, td.waits)),
total_wait_time_ms =
SUM
(
SUM(CONVERT(bigint, td.waits)) *
AVG(td.average_wait_time_ms)
CONVERT
(
bigint,
td.waits *
td.average_wait_time_ms
)
) + MAX(td.max_wait_time_ms),
average_wait_time_ms = CONVERT(bigint, AVG(td.average_wait_time_ms)),
max_wait_time_ms = CONVERT(bigint, MAX(td.max_wait_time_ms))
Expand Down
2 changes: 2 additions & 0 deletions sp_QuickieStore/sp_QuickieStore.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5204,6 +5204,8 @@ BEGIN
#dm_exec_query_stats;
TRUNCATE TABLE
#query_types;
TRUNCATE TABLE
#am_pm;
END;

FETCH NEXT
Expand Down

0 comments on commit bdd6481

Please sign in to comment.