patternsqlMinor
What happens with statistics when reverting to a database snapshot
Viewed 0 times
whatwithdatabasesnapshotstatisticsrevertingwhenhappens
Problem
Lets say I have a database FOO for which I created a snapshot (named FOO_snap). Now I'll run thousands of queries on this DB. After that I will revert DB to FOO_snap. Will I lose all of the statistics which were created for these thousand of queries?
Solution
Yes you would:
The original source database is overwritten by the reverted database, so any updates to the database since the snapshot's creation are lost.
and
The metadata of a reverted database is the same as the metadata at the time of the snapshot.
Quotes from Revert a Database to a Database Snapshot in the MSDN Library.
The original source database is overwritten by the reverted database, so any updates to the database since the snapshot's creation are lost.
and
The metadata of a reverted database is the same as the metadata at the time of the snapshot.
Quotes from Revert a Database to a Database Snapshot in the MSDN Library.
Context
StackExchange Database Administrators Q#98927, answer score: 4
Revisions (0)
No revisions yet.