image image

Script Download:  
The script is available for download from  You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

This T-SQL script will check the plan cache for the top 25 inefficient query plans. It will list total CPU time, CPU time per execution, total read IOs, average read IOs per execution, total recompiles and average recompiles per execution.

You can find more All-In-One Script Framework script samples at