0

I created a view for testing purposes and would like to see the execution time.

But i was unable to find an option to do this could somebody please guide me how i could get this information.

WiiMaxx
  • 5,322
  • 8
  • 51
  • 89

1 Answers1

3

little easy way

set statistics time on

select * from [dbo].[ViewName]

set statistics time off

then see your message window

enter image description here

For more information of Query Execution Plan

Community
  • 1
  • 1
wiretext
  • 3,302
  • 14
  • 19
  • oh gosh, i tried `set statistics time on/off` but haven't looked in my Messages Tab thanks for this hint :D – WiiMaxx Aug 11 '15 at 12:33
  • 2
    It is unlikely to be an issue, and certainly hasn't stopped me from voting for this answer, but it is worth noting, that setting statistics on, *can* (not necessarily will) affect performance of the query it is measuring if it contains a scalar udf. [This article](http://www.sqlservercentral.com/articles/T-SQL/91724/) touches on the subject in more detail about half way through. This of course could all be moot if the view does not contain a scalar udf, but could be useful for anyone reading in future. – GarethD Aug 11 '15 at 12:40