No. The query plan is not stored along with the view. The query plan is stored for Procedures and functions, but not for views.
This can be good, and this can be bad. For example, if you are joining 10 tables in a view, but the query you write against the view only uses 3 tables, then the execution plan will ignore the 7 unused tables, allowing the query to run faster.
Really... there is no performance advantage of views. Sometimes you will see a slight performance gain, but this has more to do with data caching than anything else. The way I see it, the ONLY benefit of a view is to hide rather complex queries that can be re-used by several (or many) other queries.
I'll give you an example from my own application. My application optimizes school bus routes to minimize number of buses, times, and miles. This is a lot more complicated than most people give it credit for. Anyway... I have many customers, each with their own reporting requirements. You can have different routes depending on the weekday. Some students transfer buses to get to/from school. Some students attend 1/2 day at one school and another 1/2 day at another school. There are about a dozen normalized tables to store all of this data. I created a view named ReportStudent that flattens all the data and returns about 200 columns (pickup bus, pickup location, pickup time pickup driver, dropoff stuff, each for different days of the week, etc...).
This view is extremely complicated and joins/self joins about 50 tables (at least). It is rather slow to run the view when returning all of the data (about 30 seconds for most customers). The advantage is that they can then create their own reports from this data, to do whatever they want.
-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom