<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Overhead of Row Versioning</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx</link><description>Last week I was teaching a class on snapshot isolation and we discussed the overheads of snapshot isolation. There are three main overheads that you need to be aware of when you enable snapshot isolation read-committed-snapshot on a database. First, each</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Overhead of Row Versioning</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#8345219</link><pubDate>Mon, 31 Mar 2008 10:35:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8345219</guid><dc:creator>GProssliner</dc:creator><description>&lt;p&gt;When RowVersioning is enabled on a Database (even with ROLLBACK IMMEDIATE), it takes about a second (with a small or empty database) or several minutes to complete. You say that the extra Data needed for each row is added in a lazy way only when needed (my assumption was that it does it when executing the ALTER DATABASE command), so&lt;/p&gt;
&lt;p&gt;1. what happens when executing the ALTER DATABASE Command?&lt;/p&gt;
&lt;p&gt;2. is there a kind of &amp;quot;formula&amp;quot; how long will it takes approximately for an existing Database? Does it depend solely on the Database-Size?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
</description></item><item><title>re: Overhead of Row Versioning</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#8345871</link><pubDate>Mon, 31 Mar 2008 19:36:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8345871</guid><dc:creator>Sunil Agarwal</dc:creator><description>&lt;p&gt;No formula. It depends on the existing transactional activity in the database. &lt;/p&gt;
&lt;p&gt;Here is from BOL:&lt;/p&gt;
&lt;p&gt;For SNAPSHOT ISOLATION::&lt;/p&gt;
&lt;p&gt;When you set ALLOW_SNAPSHOT_ISOLATION to a new state (from ON to OFF, or from OFF to ON), ALTER DATABASE does not return control to the caller until all existing transactions in the database are committed. If the database is already in the state specified in the ALTER DATABASE statement, control is returned to the caller immediately. If the ALTER DATABASE statement does not return quickly, use sys.dm_tran_active_snapshot_database_transactions to determine whether there are long-running transactions. If the ALTER DATABASE statement is canceled, the database remains in the state it was in when ALTER DATABASE was started. The sys.databases catalog view indicates the state of snapshot-isolation transactions in the database. If snapshot_isolation_state_desc = IN_TRANSITION_TO_ON, ALTER DATABASE ALLOW_SNAPSHOT_ISOLATION OFF will pause six seconds and retry the operation. &lt;/p&gt;
&lt;p&gt;FOR RCSI::&lt;/p&gt;
&lt;p&gt;To set READ_COMMITTED_SNAPSHOT ON or OFF, there must be no active connections to the database except for the connection executing the ALTER DATABASE command. However, the database does not have to be in single-user mode. You cannot change the state of this option when the database is OFFLINE.&lt;/p&gt;
</description></item><item><title>re: Overhead of Row Versioning</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#8577477</link><pubDate>Fri, 06 Jun 2008 13:44:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8577477</guid><dc:creator>Eladio Rincón</dc:creator><description>&lt;p&gt;I've done a few tests and reorganizing the index does not free the extra bytes. Am I correct? I understand that the difference is not big, because only affects to the modified rows, but there are scenarios where customers cannot afford rebuilding the index -- specially non-EE. Would be expensive including that code in the reorganize algorithm?&lt;/p&gt;
&lt;p&gt;Thank you for this post Sunil.&lt;/p&gt;
&lt;p&gt;Eladio&lt;/p&gt;
</description></item><item><title>re: Overhead of Row Versioning</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#8578503</link><pubDate>Fri, 06 Jun 2008 20:16:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8578503</guid><dc:creator>Sunil Agarwal</dc:creator><description>&lt;p&gt;Can you please send me a simple repro? thanks&lt;/p&gt;
</description></item><item><title>re: Overhead of Row Versioning</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#8579035</link><pubDate>Sat, 07 Jun 2008 00:42:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8579035</guid><dc:creator>Eladio Rincón</dc:creator><description>&lt;p&gt;The script is based on you example; in the original script before querying the DMV I inserted a waitfor because takes a bit refreshing the DMV; some of the comments are in spanish, but the TSQL is easy.&lt;/p&gt;
&lt;p&gt;Thank you for checking it Sunit.&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;-- Implicaciones en filas de niveles de aislamiento row-versioning&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;-- Eladio Rinc&amp;#243;n (script basado en Sunil Agarwal )&lt;/p&gt;
&lt;p&gt;-- &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx"&gt;http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-- Solid Quality Mentors&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;set nocount on&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;use master&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;alter database Northwind&lt;/p&gt;
&lt;p&gt;set allow_snapshot_isolation Off&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;alter database Northwind&lt;/p&gt;
&lt;p&gt;set READ_COMMITTED_SNAPSHOT off&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;use northwind&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;if exists (select * from sys.tables where name = 't2_snapshot')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;drop table dbo.t2_snapshot &lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;-- tabla de 1000 y pico bytes&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;create table dbo.t2_snapshot (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;c1 int identity &lt;/p&gt;
&lt;p&gt; &amp;nbsp;, c2 char(1000) default('a')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, constraint pk_t2_snapshot primary key (c1)&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;-- inserci&amp;#243;n de 1000 filas&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;insert dbo.t2_snapshot (c2)&lt;/p&gt;
&lt;p&gt;select top (1000) 'a' &lt;/p&gt;
&lt;p&gt;from [Order Details]&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;-- habilitar snapshot_isolation&lt;/p&gt;
&lt;p&gt;-- &lt;/p&gt;
&lt;p&gt;-- no requiere libre de conexiones&lt;/p&gt;
&lt;p&gt;-- si para read-commited-snapshot&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;alter database Northwind&lt;/p&gt;
&lt;p&gt;set allow_snapshot_isolation ON&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select &lt;/p&gt;
&lt;p&gt; &amp;nbsp;index_level, min_record_size_in_bytes&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, avg_record_size_in_bytes, max_record_size_in_bytes&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, object_id('t2_snapshot')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;index_level min_record_size_in_bytes avg_record_size_in_bytes max_record_size_in_bytes&lt;/p&gt;
&lt;p&gt;----------- ------------------------ ------------------------ ------------------------&lt;/p&gt;
&lt;p&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011&lt;/p&gt;
&lt;p&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;update dbo.t2_snapshot set c2 = 'b'&lt;/p&gt;
&lt;p&gt;where c1 = 1&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select &lt;/p&gt;
&lt;p&gt; &amp;nbsp;index_level, min_record_size_in_bytes&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, avg_record_size_in_bytes, max_record_size_in_bytes&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, object_id('t2_snapshot')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;index_level min_record_size_in_bytes avg_record_size_in_bytes max_record_size_in_bytes&lt;/p&gt;
&lt;p&gt;----------- ------------------------ ------------------------ ------------------------&lt;/p&gt;
&lt;p&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011.014 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1025&lt;/p&gt;
&lt;p&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;alter index pk_t2_snapshot&lt;/p&gt;
&lt;p&gt;on dbo.t2_snapshot&lt;/p&gt;
&lt;p&gt;reorganize&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select &lt;/p&gt;
&lt;p&gt; &amp;nbsp;index_level, min_record_size_in_bytes&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, avg_record_size_in_bytes, max_record_size_in_bytes&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, object_id('t2_snapshot')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;index_level min_record_size_in_bytes avg_record_size_in_bytes max_record_size_in_bytes&lt;/p&gt;
&lt;p&gt;----------- ------------------------ ------------------------ ------------------------&lt;/p&gt;
&lt;p&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011.014 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1025&lt;/p&gt;
&lt;p&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;alter index pk_t2_snapshot&lt;/p&gt;
&lt;p&gt;on dbo.t2_snapshot&lt;/p&gt;
&lt;p&gt;rebuild&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select &lt;/p&gt;
&lt;p&gt; &amp;nbsp;index_level, min_record_size_in_bytes&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, avg_record_size_in_bytes, max_record_size_in_bytes&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, object_id('t2_snapshot')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;index_level min_record_size_in_bytes avg_record_size_in_bytes max_record_size_in_bytes&lt;/p&gt;
&lt;p&gt;----------- ------------------------ ------------------------ ------------------------&lt;/p&gt;
&lt;p&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1011&lt;/p&gt;
&lt;p&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
</description></item><item><title>re: Overhead of Row Versioning</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#8579285</link><pubDate>Sat, 07 Jun 2008 03:51:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8579285</guid><dc:creator>Sunil Agarwal</dc:creator><description>&lt;p&gt;The reorganize (i.e. defrag) does not remove the versioning information but &amp;nbsp;offline rebuild of index can remove it. But you will need to disable snapshot isolation. Please try the script &amp;nbsp;that I sent in my blog to start off.&lt;/p&gt;
</description></item><item><title>re: Overhead of Row Versioning</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#8580639</link><pubDate>Sun, 08 Jun 2008 13:44:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8580639</guid><dc:creator>Eladio Rincón</dc:creator><description>&lt;p&gt;The versioning informations is only removed when you rebuild the index. Reorganize does not remove the extra bytes in any case (with or without snapshot enabled).&lt;/p&gt;
&lt;p&gt;Maybe si my version:&lt;/p&gt;
&lt;p&gt;select @@version&lt;/p&gt;
&lt;p&gt;Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) &lt;/p&gt;
&lt;p&gt;this is the script I've used. the only difference with your:&lt;/p&gt;
&lt;p&gt;1) table with clustered index&lt;/p&gt;
&lt;p&gt;2) table in Northwind Database&lt;/p&gt;
&lt;p&gt;create table dbo.t2_snapshot (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;c1 int identity &lt;/p&gt;
&lt;p&gt; &amp;nbsp;, c2 char(1000) default('a')&lt;/p&gt;
&lt;p&gt; &amp;nbsp;, constraint pk_t2_snapshot primary key (c1)&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;this is the complete repro:&lt;/p&gt;
&lt;p&gt;use Northwind&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;truncate table dbo.t2_snapshot &lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;insert dbo.t2_snapshot (c2)&lt;/p&gt;
&lt;p&gt;select top (1000) 'a' &lt;/p&gt;
&lt;p&gt;from [Order Details]&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;alter database Northwind&lt;/p&gt;
&lt;p&gt;set allow_snapshot_isolation ON&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;update dbo.t2_snapshot set c2 = 'b'&lt;/p&gt;
&lt;p&gt;where c1 = 1&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select max(max_record_size_in_bytes) max&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind'), &lt;/p&gt;
&lt;p&gt; &amp;nbsp;object_id('dbo.t2_snapshot'),&lt;/p&gt;
&lt;p&gt; &amp;nbsp;null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;max&lt;/p&gt;
&lt;p&gt;-------&lt;/p&gt;
&lt;p&gt;1025&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;alter index pk_t2_snapshot&lt;/p&gt;
&lt;p&gt;on dbo.t2_snapshot&lt;/p&gt;
&lt;p&gt;reorganize&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select max(max_record_size_in_bytes) max&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind'), &lt;/p&gt;
&lt;p&gt; &amp;nbsp;object_id('dbo.t2_snapshot'),&lt;/p&gt;
&lt;p&gt; &amp;nbsp;null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;max&lt;/p&gt;
&lt;p&gt;-------&lt;/p&gt;
&lt;p&gt;1025&lt;/p&gt;
&lt;p&gt;11&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;alter database Northwind&lt;/p&gt;
&lt;p&gt;set allow_snapshot_isolation Off&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;alter index pk_t2_snapshot&lt;/p&gt;
&lt;p&gt;on dbo.t2_snapshot&lt;/p&gt;
&lt;p&gt;reorganize&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select max(max_record_size_in_bytes) max&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind'), &lt;/p&gt;
&lt;p&gt; &amp;nbsp;object_id('dbo.t2_snapshot'),&lt;/p&gt;
&lt;p&gt; &amp;nbsp;null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;max&lt;/p&gt;
&lt;p&gt;-------&lt;/p&gt;
&lt;p&gt;1025&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;alter index pk_t2_snapshot&lt;/p&gt;
&lt;p&gt;on dbo.t2_snapshot&lt;/p&gt;
&lt;p&gt;rebuild&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select max(max_record_size_in_bytes) max&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind'), &lt;/p&gt;
&lt;p&gt; &amp;nbsp;object_id('dbo.t2_snapshot'),&lt;/p&gt;
&lt;p&gt; &amp;nbsp;null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;max&lt;/p&gt;
&lt;p&gt;-------&lt;/p&gt;
&lt;p&gt;1011&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;truncate table dbo.t2_snapshot &lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;insert dbo.t2_snapshot (c2)&lt;/p&gt;
&lt;p&gt;select top (1000) 'a' &lt;/p&gt;
&lt;p&gt;from [Order Details]&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;alter database Northwind&lt;/p&gt;
&lt;p&gt;set allow_snapshot_isolation ON&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;update dbo.t2_snapshot set c2 = 'b'&lt;/p&gt;
&lt;p&gt;where c1 = 1&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select max(max_record_size_in_bytes) max&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind'), &lt;/p&gt;
&lt;p&gt; &amp;nbsp;object_id('dbo.t2_snapshot'),&lt;/p&gt;
&lt;p&gt; &amp;nbsp;null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;max&lt;/p&gt;
&lt;p&gt;-------&lt;/p&gt;
&lt;p&gt;1025&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
&lt;p&gt;alter index pk_t2_snapshot&lt;/p&gt;
&lt;p&gt;on dbo.t2_snapshot&lt;/p&gt;
&lt;p&gt;rebuild&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;select max(max_record_size_in_bytes) max&lt;/p&gt;
&lt;p&gt;from sys.dm_db_index_physical_stats (&lt;/p&gt;
&lt;p&gt; &amp;nbsp;db_id('Northwind'), &lt;/p&gt;
&lt;p&gt; &amp;nbsp;object_id('dbo.t2_snapshot'),&lt;/p&gt;
&lt;p&gt; &amp;nbsp;null, null, 'DETAILED')&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;/*&lt;/p&gt;
&lt;p&gt;max&lt;/p&gt;
&lt;p&gt;-------&lt;/p&gt;
&lt;p&gt;1011&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;
</description></item><item><title>Bulk Loading Data into a Table with Concurrent Queries</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#9534245</link><pubDate>Mon, 06 Apr 2009 22:21:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9534245</guid><dc:creator>Technical Notes</dc:creator><description>&lt;p&gt;Authors: Alexei Khalyako, Stuart Ozer Contributor: Sanjay Mishra Technical Reviewers: Mark Souza, Denny&lt;/p&gt;
</description></item><item><title>Why did the size of my indexes expand when I rebuilt my indexes?</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#9625698</link><pubDate>Mon, 18 May 2009 21:27:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9625698</guid><dc:creator>Microsoft SQL ISV Program Management Team</dc:creator><description>&lt;p&gt;Recently I worked with a partner who was seeing some interesting behavior. Upon rebuilding their indexes&lt;/p&gt;
</description></item><item><title>Why did the size of my indexes expand when I rebuilt my indexes?</title><link>http://blogs.msdn.com/sqlserverstorageengine/archive/2008/03/30/overhead-of-row-versioning.aspx#9625699</link><pubDate>Mon, 18 May 2009 21:27:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9625699</guid><dc:creator>SQL Programmability &amp; API Development Team Blog</dc:creator><description>&lt;p&gt;Recently I worked with a partner who was seeing some interesting behavior. Upon rebuilding their indexes&lt;/p&gt;
</description></item></channel></rss>