Home All Groups Group Topic Archive Search About

View prevents stored procedure from caching execution plan?

Author
23 Mar 2006 1:56 PM
Alexander Korol
Hello

SQL Server 2000 SP4

According to the books View's execuion plan is recalculated each time the
view is accessed. Does it mean that if stored procedure queries data from a
view, possibly filtering output with WHERE clause its own execution plan will
also be recalculated each time?

Thanks in advance.

Author
23 Mar 2006 2:04 PM
Tibor Karaszi
Plan caching against a view work the same way as if you queried the table directly. It doesn't
matter if you execute the queries from a stored procedure or not.

Show quote
"Alexander Korol" <AlexanderKo***@discussions.microsoft.com> wrote in message
news:CCEA6612-775C-4C7A-B8AC-A41F3F90938C@microsoft.com...
> Hello
>
> SQL Server 2000 SP4
>
> According to the books View's execuion plan is recalculated each time the
> view is accessed. Does it mean that if stored procedure queries data from a
> view, possibly filtering output with WHERE clause its own execution plan will
> also be recalculated each time?
>
> Thanks in advance.

AddThis Social Bookmark Button