Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
subhaoviya
Posting Yak Master
135 Posts |
Posted - 2012-09-19 : 07:13:06
|
| Hi, Is it view gives better performance or the direct select query gives us better performance to use it in Stored procedure.ThanksSubha |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-09-19 : 09:24:57
|
| In general there should not be any difference unless the view is an indexed view; I would expect that the query plans generated would be the same. However, the query optimizer does not search all possible query plans to see which would perform best and so it is possible that when a view is involved, the optimal plan generated may be different if the view was not present. If that is the case, I would think of it more as a quirk of the optimizer. |
 |
|
|
|
|
|