• Thanks for the wonderful article Ian. As soon as i read this article i tested this out on one of our development environments. I compared the results from your code and from the execution plan. The results are not really the same. In the execution plan i can see there are many clustered scans going on and the result from your script doesn't show any scans at all. Mentioned below is my script:

    EXEC dbo.dba_ShowIndexUsage @SQLToRun ='exec usp_myproc @Id=1237405'

    This procedures has following objects:

    i) few functions

    ii) few views

    iii) few tables.

    Could you please say why is the output different or is it intended to use for different purpose? Thanks