0

Is there a real performance gain when creating a view and selecting everything from it, compared to just running the TSQL that first "created" the view? Disconsider the cost of parsing the raw tsql-text.

Leonardo
  • 10,737
  • 10
  • 62
  • 155
  • 1
    Have you tried testing both options by checking the statistics (e.g. [SET STATISTICS IO ON](http://technet.microsoft.com/en-us/library/ms184361.aspx)), and checking the execution plans etc? Or read the answers to [this question](http://stackoverflow.com/q/439056/1048425)?. In short, the answer is no, the view itself does not provide any performance gain, it still has to be compiled and executed just like the sql that created the view. You can however, index a view, which can improve performance. – GarethD Dec 03 '13 at 14:08
  • Problem is, that question has the wrong answer. The correct answer is that a normal View is exactly the same as it's equivalent query. – RBarryYoung Dec 03 '13 at 15:51

0 Answers0