Sometimes it's hard to combine system objects, especially dynamic management, together. No simple and unified instructions exist for it, but the next example shows a way of thinking about system queries.
One of the performance issues can be too frequent recompilations of execution plans. We want to have an overview of plan cache content. We want to know which plans are cached and how they are reused. The most simple information is provided by the sys.dm_exec_cached_plans view. Let's execute the following script:
select * from sys.dm_exec_cached_plans
We will see the following result:
Such a result is full of almost ...