While the examples in this chapter are only a small sample, hopefully, at this point, we can see how DMVs and DMFs can be a powerful troubleshooting tool when it comes to diagnosing query performance issues. They are lightweight, easy to use, and provide a breadth of information that is useful for zeroing in on the performance issues that were covered in Chapter 6, Easily Identified T-SQL Anti-Patterns, and Chapter 7, Discovering T-SQL Anti-Patterns in Depth.
While DMVs are great for point in time and cumulative analysis, there are some issues that can only be diagnosed by catching queries and related data in real time. This is where tracing with Extended Events (XEvents) is useful.
In the next chapter, we will introduce XEvents and discuss how to set up the new XEvent Profiler trace, which can capture all the queries that are executed against a server in real time.
...