Download - SQL Server 2005 Row Level Versioning
![Page 2: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/2.jpg)
ContentsWhat is Row level Versioning How it worksWhat uses it?ConclusionCosts of using RLV
May 27, 2010 2Curaçao SQL Server User Group
![Page 3: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/3.jpg)
What is Row Level VersioningIn Computing terms Version means a number
indicating which revision something is.Versioning works by making any transaction
that changes data keep the old versions of the data around so that a 'snapshot' of the database (or a part of the database) can be constructed from these old versions.
Version records need to be kept in the version store only as long as there are there are operations that might require them.
May 27, 2010 3Curaçao SQL Server User Group
![Page 4: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/4.jpg)
What it uses.Snapshot Isolation (SI)Read Committed Snapshot Isolation (RCSI)
May 27, 2010 4Curaçao SQL Server User Group
These isolation levels let the Select get the previously committed value of the row without causing any blocking.
![Page 5: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/5.jpg)
May 27, 2010 5Curaçao SQL Server User Group
SQL Server keeps previously committed value when it gets updated.
Chance of multiple versions of same row to be maintained.
Uses TempDB to store the versions.
How it works
![Page 6: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/6.jpg)
Test and see if it works.
May 27, 2010 6Curaçao SQL Server User Group
Create a test DBSet two Isolation LevelsCreate test objects, dataTest the versioning
![Page 7: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/7.jpg)
What uses RLV Technology
TriggersOnline Index CreationMultiple Active Result Sets
May 27, 2010 7Curaçao SQL Server User Group
![Page 8: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/8.jpg)
Advantages of RLV
No Lock when SelectingSelect gives the last committed dataDecreases chances of Dead LockLock Escalation is reducedNot many locks used, thus reduces the load on Server
May 27, 2010 8Curaçao SQL Server User Group
![Page 9: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/9.jpg)
Cost due to RLV
Since versions are kept, increased use of resourcesHigher IO, CPU, Mem Usage when doing Updates and
DeletesTEMPDB must have more space to handle versions14 bytes will be added to the row in the DB to keep
track of versionsLong version chain can affect Data read performance
May 27, 2010 9Curaçao SQL Server User Group
![Page 10: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/10.jpg)
May 27, 2010 10Curaçao SQL Server User Group
![Page 11: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/11.jpg)
Additional Resources
Technethttp://technet.microsoft.com/en-us/library/ms189050.aspx
Article by Roy Ernesthttp://www.sqlservercentral.com/articles/SQL+Server+2005/62464/#
May 27, 2010 Curaçao SQL Server User Group 11
![Page 12: SQL Server 2005 Row Level Versioning](https://reader035.vdocument.in/reader035/viewer/2022062305/5681585a550346895dc5b55e/html5/thumbnails/12.jpg)
May 27, 2010 12Curaçao SQL Server User Group