sqlserver - Changed requests to include blocking sessions.#7834
sqlserver - Changed requests to include blocking sessions.#7834spaghettidba wants to merge 2 commits intoinfluxdata:masterfrom spaghettidba:fix_requests_blocking
Conversation
|
Thanks for the pull request, but could you update the pr to minimize any whitespace changes? This will make the changes to the query a bit easier to understand and improve the history of the file. |
denzilribeiro
left a comment
There was a problem hiding this comment.
I totally agree with the change in that Sessions left outer join requests
What I don't agree is getting Session CPU time/reads/writes etc... I think it should be a coalesce
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-transact-sql?view=sql-server-ver15
If the reqest is not null, you want to get everything from the request ( CPU/IO/Transaction etc). if a session doesn't have a request then get it from the session
|
@denzilribeiro No problem, I'll change it to a COALESCE. @danielnelson I certainly could reduce the number of whitespace changes, but the query is formatted in a way that makes it a bit hard to read. How do you suggest I can improve it? Should I open a second PR? Wouldn't that "clutter" the history of the file anyway? Should I avoid changing formatting at all? |
|
Hi! Sorry to bother. Will this PR be merged now that it's approved? Do I need to do anything else? |
|
@ssoroka can you have a look at this? |
ssoroka
left a comment
There was a problem hiding this comment.
It seems like coalescing the values from two different tables into a single column has the potential to provide really weird behavior. Would it be better to report these as separate columns instead?
No that is how it should be actually. Don't merge this, I will take care of it under PR #7934 given the major change if that is ok with you and @Trovalo |
|
Fine by me. I'll close this out, then. |
Incorporated changes from - influxdata#7834
Incorporated changes from - influxdata#7834
Required for all PRs:
Changed query to gather requests to also include blocking sessions. The original query started from sys.dm_exec_requests, which excludes all idle queries (which have a session but not a request).
Also fixed query text truncation of the last character.