Open funooni opened 3 years ago
Hi, thank you for this. I will take a look.
Are you referring to the query in the dashboard, or the query that collects the data into the table?
Are you referring to the query in the dashboard, or the query that collects the data into the table?
The query that collects the data into the table. Its the first insert inside the procedure "usp_sqlwatch_logger_requests_and_sessions"
I just created a pull request with this change as well.
In the Dashboard : SQL Instance Overview, the "Waiting" tile is showing wrong values.
The value comes from the table sqlwatch_logger_dm_exec_requests_stats column waiting_tasks.
The problem is due to the sum of duplicate rows in the first query which populates the table sqlwatch_logger_dm_exec_requests_stats. The duplicate rows are because of lack of join on session id. I have changed the source sp "usp_sqlwatch_logger_requests_and_sessions" and it works fine. However, I have not done any smoke testing except the values in this tile.
added the below in selection
, t.session_id
had to group bygroup by case when t.session_id > 50 then 1 else 0 end , t.session_id
then added the below in join conditionon t.type = case when r.session_id > 50 then 1 else 0 end and t.session_id = r.session_id