July 27, 2009 at 8:31 am
When I drop a view or stored procedure, is cache clear automatically ??
July 27, 2009 at 8:37 am
I don't think either cache is cleared. The procedure cache, because that will likely be cleared as space is needed. Same for execution plans.
For the data cache, that's data, not a view or a proc. It is also cleared as new space is needed and that data is stale.
July 27, 2009 at 8:52 am
Thanks for your reply.
We have snashot replication we are dropping all tables,views,stored procedures,functions,indexes,foreign keys etc and recreating them. Will they impact in any way to cache and execution plan.
July 27, 2009 at 9:27 am
The entire of cache won't be cleared (that would be a bad thing). Just the plan of the object dropped will be marked as invalid and discarded.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 27, 2009 at 9:36 am
Did you mean there is no impact on cache but execution plan will be recreated.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply