<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.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>Linchi Shea : SQL Server 2008</title><link>http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx</link><description>Tags: SQL Server 2008</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Is the SELECT permission checked in an UPDATE statement?</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2011/10/17/is-the-select-permission-checked-in-an-update-statement.aspx</link><pubDate>Mon, 17 Oct 2011 19:44:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39116</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/39116.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=39116</wfw:commentRss><description>I was at PASS Summit 2011 in Seattle and had a chat with Jack Richins of Microsoft on the SQL Server audit feature after his presentation. A question came up with regards to whether the SELECT permission should be checked when an UPDATE statement is being...(&lt;a href="http://sqlblog.com/blogs/linchi_shea/archive/2011/10/17/is-the-select-permission-checked-in-an-update-statement.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=39116" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Audit/default.aspx">Audit</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Server+audit/default.aspx">Server audit</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>Performance impact: Try/Catch blocks in SQLCLR – a follow up</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2011/07/08/performance-impact-try-catch-blocks-in-sqlclr-a-follow-up.aspx</link><pubDate>Fri, 08 Jul 2011 03:48:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:36715</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>2</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/36715.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=36715</wfw:commentRss><description>My previous post showed a simple test that appears to suggest that you may experience significant performance degradation if multiple users are calling the same SQLCLR function at the same time and they are all catching a lot of exceptions. However, it’s...(&lt;a href="http://sqlblog.com/blogs/linchi_shea/archive/2011/07/08/performance-impact-try-catch-blocks-in-sqlclr-a-follow-up.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=36715" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQLCLR/default.aspx">SQLCLR</category></item><item><title>Performance impact: too many try/catch blocks may be harmful in SQLCLR</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2011/07/06/performance-impact-too-many-try-catch-blocks-may-be-harmful-in-sqlclr.aspx</link><pubDate>Wed, 06 Jul 2011 04:40:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:36663</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/36663.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=36663</wfw:commentRss><description>If you have many try/catch blocks in your .NET code and your code execution actually passes through them, you should expect a performance hit. That’s intuitive and no surprise. What is surprising is the extent to which you may experience severe performance...(&lt;a href="http://sqlblog.com/blogs/linchi_shea/archive/2011/07/06/performance-impact-too-many-try-catch-blocks-may-be-harmful-in-sqlclr.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=36663" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/36663.ashx" length="2477" type="application/x-zip-compressed" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQLCLR/default.aspx">SQLCLR</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Try_2F00_Catch/default.aspx">Try/Catch</category></item><item><title>SQL Server challenge: show me trace flag 1118 is significant</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2009/10/01/sql-server-challenge-show-me-trace-flag-1118-is-significant.aspx</link><pubDate>Thu, 01 Oct 2009 15:53:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:17179</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>10</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/17179.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=17179</wfw:commentRss><description>Here is a SQL Server challenge as I have failed so far: Describe a reproducible workload that would see significant throughput improvement when trace flag 1118 is enabled. I have seen a lot of chatters, anecdotes, and stories on the impact of trace flag...(&lt;a href="http://sqlblog.com/blogs/linchi_shea/archive/2009/10/01/sql-server-challenge-show-me-trace-flag-1118-is-significant.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=17179" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/17179.ashx" length="27708" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Benchmark/default.aspx">Benchmark</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/tempdb/default.aspx">tempdb</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Trace+flags/default.aspx">Trace flags</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Waits/default.aspx">Waits</category></item><item><title>T-SQL Exercise: Simplest data-loading script to produce worst query performance – June 7th Update</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2009/06/07/t-sql-exercise-simplest-data-loading-script-to-produce-worst-query-performance-june-7th-update.aspx</link><pubDate>Mon, 08 Jun 2009 01:31:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:14547</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/14547.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=14547</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;All the previously posted results (&lt;/FONT&gt;&lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2009/05/26/t-sql-exercise-simplest-data-loading-script-to-produce-worst-query-performance-may-25th-update.aspx"&gt;&lt;FONT color=#606420&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;May 25&lt;SUP&gt;th&lt;/SUP&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt; and &lt;/FONT&gt;&lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2009/05/29/t-sql-exercise-simplest-data-loading-script-to-produce-worst-query-performance-may-29th-update.aspx"&gt;&lt;FONT color=#606420&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;May 29&lt;SUP&gt;th&lt;/SUP&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt;) on this exercise were obtained with query parallelism disabled (i.e. the sp_configure ‘max degree of parallelism’ option was set to 1).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Since&amp;nbsp;the following test query&amp;nbsp;is sensitive to query parallelism, we need to see what impact query parallelism may have.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e6e6e6;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;DBCC DROPCLEANBUFFERS &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e6e6e6;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;go&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e6e6e6;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;SELECT COUNT(*) FROM dbo.test;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;It turns out that&amp;nbsp;with parallelism the test query exhibited significantly different performance characteristics with the three data sets we have been using as test vehicles than without parallelism. And again, the nature of the storage system proved to be a significant confounding factor. The following table shows the results with query parallelism on both the internal drive (the C: drive) and the drive presented from a departmental level disk array (the E: drive), the same two drives used in the &lt;/FONT&gt;&lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2009/05/26/t-sql-exercise-simplest-data-loading-script-to-produce-worst-query-performance-may-25th-update.aspx"&gt;&lt;FONT color=#606420&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;May 25&lt;SUP&gt;th&lt;/SUP&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt; update and the &lt;/FONT&gt;&lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2009/05/29/t-sql-exercise-simplest-data-loading-script-to-produce-worst-query-performance-may-29th-update.aspx"&gt;&lt;FONT face="Times New Roman" color=#606420 size=3&gt;May 29&lt;SUP&gt;th&lt;/SUP&gt; update&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT:medium none;BORDER-TOP:medium none;MARGIN:auto auto auto 5.4pt;BORDER-LEFT:medium none;BORDER-BOTTOM:medium none;BORDER-COLLAPSE:collapse;mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:191;mso-padding-alt:0in 5.4pt 0in 5.4pt;mso-border-insideh:.5pt solid windowtext;mso-border-insidev:.5pt solid windowtext;" cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;

&lt;TR style="mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:1.5in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Drive&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Test Run &lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Elapsed Time (second)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:1;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:1.5in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;" rowSpan=9&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Internal (C:)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Adam’s script – test run 1&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;90&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:2;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Adam’s script – test run 2&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;88&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:3;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Adam’s script – test run 3&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;87&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:4;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Tibor’s script – test run 1&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;217&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:5;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Tibor’s script – test run 2&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;219&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:6;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Tibor’s script – test run 3&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;226&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:7;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Linchi’s script – test run 1&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;325&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:8;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Linchi’s script – test run 2&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;324&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:9;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Linchi’s script – test run 3&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;324&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:10;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:1.5in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;" rowSpan=9&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Disk array (E:)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Adam’s script – test run 1&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;74&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:11;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Adam’s script – test run 2&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;75&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:12;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Adam’s script – test run 3&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;72&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:13;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Tibor’s script – test run 1&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;93&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:14;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Tibor’s script – test run 2&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;97&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:15;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Tibor’s script – test run 3&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;89&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:16;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Linchi’s script – test run 1&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;51&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:17;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Linchi’s script – test run 2&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;51&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:18;mso-yfti-lastrow:yes;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Linchi’s script – test run 3&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:135pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;51&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Note the dramatic change in the relative impact of the data sets on the test query when the storage performance and query parallelism were added to the mix. In particular, note how the test query was able to perform much faster on the faster drive (drive E:) with some data sets.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;I just want to present the data points in this post, and will dive in a bit in the next follow up.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=14547" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Disk+I_2F00_O/default.aspx">Disk I/O</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Query+Processing/default.aspx">Query Processing</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Storage/default.aspx">Storage</category></item><item><title>Performance impact: thread mode vs. fiber mode</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2009/05/04/performance-impact-thread-mode-vs-fiber-mode.aspx</link><pubDate>Mon, 04 May 2009 19:56:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:13764</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>7</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/13764.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=13764</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;SQL Server can run in one of two modes: thread mode or fiber mode. By default, SQL Server runs in thread mode in which a SQL Server worker is associated with a Windows thread throughout all phases of its execution. This can be changed with the sp_configure option ‘Lightweight Pooling’. When Lightweight Pooling is turned on, SQL Server runs in fiber mode in which a SQL Server worker is associated with a user-mode Windows construct called fiber. Switching among fibers is handled in the user mode with the objective of reducing the cost of calling into the kernel for context switches.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Whenever fiber mode is discussed, Microsoft has always piled a huge load of ominous warnings, generally related to the potential stability issues that may come up with fiber mode. And because of these warnings, fiber mode is rarely, if ever, used in real world production environments. Staying away from fiber mode is of course the right thing to do because many of the ‘external SQL Server components’ that may not be fiber-mode friendly are usually essential in a real production environment.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;If you run a bare minimum SQL Server instance (e.g. no XML, no mail, no linked servers), can you expect performance gain from fiber mode? Generally speaking, you may not see any performance gain. But there are cases you can see performance gains.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;I was curious whether I could see any performance gain at all on a low-end server such as a four-core HP ProLiant DL365 G1 with 4GB of RAM. Note that this is a rather old and obsolete server model.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;It turns out that under certain workloads, fiber mode can give you a huge performance boost. For my tests, I populated a TPC-C like database with about 9GB of data, and ran read-only workloads against the database (with the two read-only transactions in TPC-C in a 50/50 transaction mix). I configured each client to wait for 20 milliseconds before submitting the next query. The following chart shows the difference in transaction throughput at various load levels (in terms of the number of simulated concurrent users running queries against the server) between thread mode and fiber mode. The data points were obtained on a SQL Server 2008 instance (Enterprise x64 Edition and the build level was 10.0.1600).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/13764.ashx"&gt; &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT face="Times New Roman" size=3&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;If we look at the cases for 400 and 600 users for example, the performance gain from thread mode to fiber mode was ~ 40% (with the thread-mode transaction throughput as the baseline). This was a huge gain. I ran the tests in various random orders and repeated the tests at various random times. The results were consistent and reproducible.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;I was surprised to see&amp;nbsp;such a&amp;nbsp;difference myself for two reasons. One is that I didn’t see much of a performance difference between thread mode and fiber mode when I ran the same workload in the same test environment &lt;I style="mso-bidi-font-style:normal;"&gt;&lt;U&gt;without&lt;/U&gt;&lt;/I&gt; the 20ms wait time. I observed only about 5% consistent but marginal gain, switching from thread mode to fiber mode when the next query was submitted immediately after the previous one was finished. I can’t explain why the wait time made the difference.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;The other reason I was surprised is that I had never seen any performance gain from enabling lightweight pooling or fiber mode before, though&amp;nbsp;I had never tried this specific workload and had never tried this on SQL Server 2008.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;I’m not sure if there is any practical value in this post because stability concerns&amp;nbsp;will and should always&amp;nbsp;trump any potential performance gain, especially when that performance gain is rather elusive. But at least it’s good to report that I have seen some real performance gain with fiber mode instead of just hearing somebody else talking about it.&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=13764" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/13764.ashx" length="5441" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Testing/default.aspx">Testing</category></item><item><title>Performance impact: a large number of virtual log files – Part II</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2009/02/12/performance-impact-a-large-number-of-virtual-log-files-part-ii.aspx</link><pubDate>Thu, 12 Feb 2009 05:40:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:11844</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/11844.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=11844</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;In my previous &lt;/FONT&gt;&lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2009/02/09/performance-impact-a-large-number-of-virtual-log-files-part-i.aspx"&gt;&lt;FONT face="Times New Roman" color=#606420 size=3&gt;post&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt; on the performance impact of having a large number of virtual log files (VLFs) in a transaction log, I showed that a large number of VLFs could&amp;nbsp;be very&amp;nbsp;bad for SQL Server 2008 performance. The test workloads were large batch delete, update, and insert. In other words, they were single monolithic transactions that generated a large number of transaction records. Intuitively, these large transactions would cause SQL Server to cross many VLF boundaries and incur the penalty of crossing these boundaries.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;The question then became: how about workloads that submit small transactions such as common OLTP workloads?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;As it turns out, a typical OLTP workload may not experience any performance degradation at all, even when the number of VLFs is into the 20,000 range.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;The supporting evidence lies in the test results of a TPC-C like benchmark that I ran against the same test databases dbVLF_small and dbVLF_large, whose setup was described in the previous post. These two test databases were configured identically except that one had 16 VLFs in its transaction log and the other had 20,000 VLFs in its transaction log. The test workload used the standard TPC-C read-write transaction mix, which means that the workload was relatively write heavy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;The test environment was the same as described in the previous post. The test database was sized for 100 TPC-C warehouses, which translates into ~9GB for all the data and indexes.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;But I’ll skip any details regarding the test setup and test data, and go straight to present the test results, which are highlighted in the following chart:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/11844.ashx"&gt; &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;For this OLTP workload, the number of VLFs in the transaction log did not make any significant difference. This, I guess, is good news. Did I hear a sigh of relief?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=11844" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/11844.ashx" length="4297" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Testing/default.aspx">Testing</category></item><item><title>Performance impact: a large number of virtual log files – Part I</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2009/02/09/performance-impact-a-large-number-of-virtual-log-files-part-i.aspx</link><pubDate>Mon, 09 Feb 2009 17:13:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:11791</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>26</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/11791.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=11791</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;It is generally known that having a large number of virtual log files (VLFs) in a database transaction log is undesirable. A &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/grahamk/archive/2008/05/16/slow-recovery-times-and-slow-performance-due-to-large-numbers-of-virtual-log-files.aspx"&gt;&lt;FONT face="Times New Roman" color=#606420 size=3&gt;blog post&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt; by the Microsoft support team in Stockholm showed that a large number of virtual log files could seriously lengthen the database recovery time. &lt;/FONT&gt;&lt;A href="http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/07/25/sql-2000-yes-lots-of-vlf-s-are-bad-improve-the-performance-of-your-triggers-and-log-backups-on-2000.aspx"&gt;&lt;FONT face="Times New Roman" color=#606420 size=3&gt;Tony Rogerson&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt; also reported that lots of virtual log files were bad for triggers and log backups on SQL Server 2000.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;This blog post explores two questions:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;OL style="MARGIN-TOP:0in;"&gt;
&lt;LI class=MsoNormal style="MARGIN:0in 0in 0pt;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Is a large number of VLFs in a transaction log still a significant performance factor in SQL Server 2008?&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN:0in 0in 0pt;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Does a large number of VLFs have an adversely impact on application-related operations such as INSERT, UPDATE, and DELETE?&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;As I’ll show in the rest of this post, the answers to both questions are yes. Let me first describe the test, and then present the test results.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;The test databases&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;I created two databases: dbVLF_small and dbVLF_large on the same SQL Server 2008 instance (Enterprise x64 Edition and the build number was 10.0.1600). The host was an&amp;nbsp;HP DL585 with four single core 2.2GHz Opteron processors and 32GB of RAM (28GB of which was allocated to the buffer pool). The following table highlights the key properties of these two test databases:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT:medium none;BORDER-TOP:medium none;MARGIN:auto auto auto 23.4pt;BORDER-LEFT:medium none;BORDER-BOTTOM:medium none;BORDER-COLLAPSE:collapse;mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:191;mso-padding-alt:0in 5.4pt 0in 5.4pt;mso-border-insideh:.5pt solid windowtext;mso-border-insidev:.5pt solid windowtext;" cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;

&lt;TR style="mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:124.2pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Property&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:3.15in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;" colSpan=2&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;TEXT-ALIGN:center;" align=center&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Property value&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:1;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:124.2pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:109.8pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;dbVLF_small&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:117pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;dbVLF_large&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:2;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:124.2pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Data file size&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:109.8pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;20GB&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:117pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;20GB&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:3;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:124.2pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Data file location&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:109.8pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;E: drive&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:117pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;E: drive&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:4;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:124.2pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Log file size&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:109.8pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;10GB&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:117pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;10GB&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:5;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:124.2pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Log file location&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:109.8pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;F: drive&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:117pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;F: drive&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:6;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:124.2pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Recovery mode&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:109.8pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Full&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:117pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Full&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:7;mso-yfti-lastrow:yes;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:124.2pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Number of VLFs&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:109.8pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;16&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:117pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;20,000&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;As you see, the only masterial difference between these two databases was the number of virtual log files. The dbVLF_small database had 16 VLFs (a small number of VLFs), and the dbVLF_large database had 20,000 VLFs (a large number of VLFs). It’s probably a bit extreme for a database to have 20,000 virtual log files. But it’s not completely unreasonable if you let your database log file to grow in small increments. Note that my intention is to highlight the impact in case if your database does end up with a large number of VLFs.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;The test table&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;An identical table, called customer, was created in both databases. The DDL for the customer table is as follows:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;CREATE TABLE customer&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_id&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;int,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_d_id&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;tinyint,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_w_id&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;int,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_first&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(16),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_middle&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(2),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_last&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(16),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_street_1&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(20),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_street_2&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(20),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_city&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(20),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_state&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(2),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_zip&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(9),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_phone&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(16),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_since&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;datetime,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_credit&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(2),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_credit_lim&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;numeric(12,2),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_discount&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;numeric(4,4),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_balance&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;numeric(12,2),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_ytd_payment&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;numeric(12,2),&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_payment_cnt&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;smallint,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_delivery_cnt&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;smallint,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;c_data&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;char(500)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;go&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;CREATE UNIQUE CLUSTERED INDEX ci_customer on customer(c_w_id, c_d_id, c_id)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#e0e0e0;MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;go&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;This was the customer table used in the TPC-C benchmark.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;The test data&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;3,000,000 rows—with data as specified for the TPC-C customer table— were bulk copied into the customer table in both databases. The index was then rebuilt, and sp_spaceused showed the table size to be about 2GB.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;The tests&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Three simple tests were run against the customer table in each database. The common characteristics of these three tests were that they were a single large transaction.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;The insert test&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;SELECT * INTO customer_tmp&lt;BR&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;FROM customer&lt;BR&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/SPAN&gt;WHERE 1=2;&lt;BR&gt;go&lt;BR&gt;INSERT customer_tmp&lt;BR&gt;SELECT * FROM customer;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;The update test&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;UPDATE customer&lt;BR&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SET c_data = lower(c_data);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;The delete test&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt 0.25in;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';"&gt;&lt;FONT size=3&gt;DELETE FROM customer;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;The test results&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;The following table summarizes the test results:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableGrid style="BORDER-RIGHT:medium none;BORDER-TOP:medium none;MARGIN:auto auto auto 0.2in;BORDER-LEFT:medium none;BORDER-BOTTOM:medium none;BORDER-COLLAPSE:collapse;mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:191;mso-padding-alt:0in 5.4pt 0in 5.4pt;mso-border-insideh:.5pt solid windowtext;mso-border-insidev:.5pt solid windowtext;" cellSpacing=0 cellPadding=0 class="MsoTableGrid"&gt;

&lt;TR style="mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:1.5in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Test&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:2in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Elapsed time (sec)&lt;BR&gt;in database: dbVLF_small &lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;Elapsed time (sec)&lt;BR&gt;in database: dbVLF_large&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:1;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:1.5in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;The insert test&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:2in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;TEXT-ALIGN:right;" align=right&gt;&lt;FONT face="Times New Roman" size=3&gt;281&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;TEXT-ALIGN:right;" align=right&gt;&lt;FONT face="Times New Roman" size=3&gt;1069&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:2;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:1.5in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;The update test&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:2in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;TEXT-ALIGN:right;" align=right&gt;&lt;FONT face="Times New Roman" size=3&gt;174&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;TEXT-ALIGN:right;" align=right&gt;&lt;FONT face="Times New Roman" size=3&gt;1554&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow:3;mso-yfti-lastrow:yes;"&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:windowtext 1pt solid;WIDTH:1.5in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;The delete test&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:2in;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;TEXT-ALIGN:right;" align=right&gt;&lt;FONT face="Times New Roman" size=3&gt;193&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT:windowtext 1pt solid;PADDING-RIGHT:5.4pt;BORDER-TOP:#d4d0c8;PADDING-LEFT:5.4pt;PADDING-BOTTOM:0in;BORDER-LEFT:#d4d0c8;WIDTH:153pt;PADDING-TOP:0in;BORDER-BOTTOM:windowtext 1pt solid;BACKGROUND-COLOR:transparent;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;TEXT-ALIGN:right;" align=right&gt;&lt;FONT face="Times New Roman" size=3&gt;936&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;The following chart gives a better visual representation of the same results:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/11791.ashx"&gt;&lt;/P&gt;&lt;FONT face="Times New Roman" size=3&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;In all the three cases, it was significantly (should I say dramatically) slower to perform these common SQL operations when the database had 20,000 VLFs than when the database had 16 VLFs. The insert was about four times slower. The update was about eight times slower, and the delete was about five times slower. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;So the test results confirm that it is definitely a significant performance issue in SQL Server 2008 to have a large number of virtual log files in a transaction log. Moreover, the test results show that the problem can be felt by common SQL operations such as insert, update, and delete in large batch processes.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;What does this all&amp;nbsp;mean? First, pay attention to the often-repeated best practice advice: do not grow your database log files in small increments (because that is often how you introduce a large number of VLFs into your transaction log). For instance, if you know you’ll need 10GB for your log, it’s best to allocate 10GB in one fell swoop. Secondly, if you do find a large number of VLFs in your transaction log, it may be worth the maintenance effort to reduce the number. You can reduce the number of VLFs by first shrinking the log file to a minimum size, and then allocating the required space in one ALTER DATABASE statement. (SQL Server MVP Tibor Karaszi has a thorough discussion on shrinking log files at his &lt;A href="http://www.karaszi.com/SQLServer/info_dont_shrink.asp"&gt;&lt;FONT color=#606420&gt;site&lt;/FONT&gt;&lt;/A&gt;)&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;------&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;By the way, the 20,000 virtual log files were generated&amp;nbsp;as follows.&amp;nbsp;First, create the database in the full recovery mode with a 512KB initial log file size and 512KB file growth increment. Then, backup the database, and create a dummy table with a single char(8000) column. Finally, inserting data into this table in a loop until the log file size reaches 5000MB. This is essentially the same procedure used by the Microsoft support team in Stockholm in their &lt;A href="http://blogs.msdn.com/grahamk/archive/2008/05/16/slow-recovery-times-and-slow-performance-due-to-large-numbers-of-virtual-log-files.aspx"&gt;&lt;FONT face="Times New Roman" color=#606420 size=3&gt;post&lt;/FONT&gt;&lt;/A&gt;. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;To prepare for the insert, update, and delete tests, backup the log, and expand the log file to 10GB.&lt;/P&gt;&lt;/FONT&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=11791" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/11791.ashx" length="5225" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Testing/default.aspx">Testing</category></item><item><title>SQL Server 2008 Data Compression: Impact of Data Distribution</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2008/06/20/sql-server-2008-data-compression-impact-of-data-distribution.aspx</link><pubDate>Fri, 20 Jun 2008 04:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7399</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>2</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/7399.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=7399</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;In this post, I continue to explore the implications of SQL Server 2008 data compression. It is particularly worth highlighting the fact that SQL Server 2008 data compression is performed at the &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;page level&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; instead of the table level. In other words, when SQL Server 2008 goes about compressing data, it does it one page at a time, and its compression algorithm considers only the data on that page.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;The page level approach to data compression has important implications, one of which is that what kind of compression ratio you get on a table depends on how the data in the table is distributed. That is, it is possible that with the exactly same set of data in the table, you can get radically different compression ratios if data is shuffled around in the table.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;To drive this point home, let me show you an extreme example with the following table:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;create table customer (&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cid&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;int identity,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;filler char(100)&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;NOT NULL, &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 12pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;) &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;With this table, I tested two scenarios:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;Scenario 1&lt;/B&gt;: Clustered index was created on column cid:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 10pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;create clustered index cus_cx on customer(cid);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;Scenario 2&lt;/B&gt;: Clustered index was created on column filler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 10pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;create clustered index cus_cx on customer(filler);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Again, with the exactly same set of data in the table, in each scenario I compressed the data, and compared the table size before the compression and after the compression.&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;The data compression was done with ALTER TABLE statement as follows:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;ALTER TABLE customer REBUILD &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 10pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;WITH (DATA_COMPRESSION = PAGE, MAXDOP=8);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;The following chart shows the table size before and after compression for each test scenario:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/7399.ashx"&gt; &lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Clearly, when the table was clustered on the column cid, the data compression ratio was very low (slightly greater than 1), whereas when the table was clustered on the column filler, the data compression ratio was very good at ~10 (the compressed table was about 10 times smaller).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Why?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;First we need to know exactly what data was in the table, i.e. we need to know the characteristics of the data. Well, the data was populated with the following script:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;declare @i int&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;set @i = 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;begin tran&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;while @i &amp;lt;= 8000000&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;begin&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;insert customer(filler)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;select left(cast(@i % 80 as varchar(8)) + '00000000', 7) + replicate('a', 92)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;if (@i % 10000) = 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;begin&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;commit tran&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;begin tran&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;end&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;select @i = @i + 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 0pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;end&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND:#d9d9d9;MARGIN:0in 0in 10pt;mso-background-themecolor:background1;mso-background-themeshade:217;"&gt;&lt;SPAN style="FONT-FAMILY:'Courier New';mso-bidi-font-family:'Times New Roman';mso-bidi-theme-font:minor-bidi;"&gt;&lt;FONT size=3&gt;commit tran&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;With this script, the first 80 rows would have the cid values going from 1 through 80, and the filler column would have 80 distinct values. With the cid values going from 81 through 160, the filler column would have another 80 distinct values, but as a set they were identical to the first 80 values. This pattern repeated every 80 rows because of the expression @i % 80 in the script.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Note that the table row was sized such that each page would contain ~80 rows. This means that if there was a clustered index on column cid, every page would have 80 distinct values in the filler column. When SQL Server tried to compress such a page, there wasn’t much to compress. Now, when the clustered index was created on the filler column instead, every page was filled with duplicate values in the filler column, making the page extremely conducive to data compression.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Again, this post is to help highlight the behavior of SQL Server 2008 data compression. The behavior presented here is neither good nor bad. It’s just a natural consequence of the page-level algorithm. Oracle’s data compression also adopts a page/block level algorithm, and therefore would see the same behavior. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Note that if all the values are distinct, no matter how you shuffle the data you won't improve its&amp;nbsp;compression ratio.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7399" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/7399.ashx" length="8959" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Data+Compression/default.aspx">Data Compression</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>SQL Server 2008 Page Compression: Performance impact on table scans</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2008/05/16/sql-server-2008-page-compression-performance-impact-on-table-scans.aspx</link><pubDate>Sat, 17 May 2008 01:28:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6835</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/6835.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=6835</wfw:commentRss><description>&lt;P&gt;My previous &lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx"&gt;post&lt;/A&gt; shows that data compression may not come for free, although hopefully by the RTM time the adverse performance impact on inserts will have been reduced significantly. In this post, I want to show you that data compression can enhance read performance. Intuitively, data compression&amp;nbsp;may reduce the number of pages SQL Server must&amp;nbsp;read into memory from disk, and the savings in terms of the number of pages can be significant, and therefore there may be a positive impact on reads. &lt;/P&gt;
&lt;P&gt;To continue our tradition of letting data points do the talking, I ran the following simple script with the customer table when (1) it was page compressed and when (2) it was not page compressed. This was the same customer table I described in an earlier post on &lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2008/05/05/sql-server-2008-page-compression-using-multiple-processors.aspx"&gt;page compression and multiple processors&lt;/A&gt;.&lt;/P&gt;
&lt;DIV style="BACKGROUND-COLOR:#cccccc;"&gt;&lt;FONT face="Courier New"&gt;dbcc dropcleanbuffers;&lt;BR&gt;declare @dt datetime;&lt;BR&gt;select @dt = getdate();&lt;BR&gt;&lt;BR&gt;select avg(c_balance) from customer;&lt;BR&gt;&lt;BR&gt;select datediff(second, @dt, getdate());&lt;BR&gt;go&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;Note that there was no index on the c_balance column, and I verified that the actual execution plan was a table scan (well a clustered index scan). DBCC DROPCLEANBUFFER was included to ensure pages were read from disk, not already cached. The following chart summarizes the results.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/6835.ashx"&gt; &lt;/P&gt;
&lt;P&gt;Wow! The elapsed time difference between the compressed data and uncompressed data&amp;nbsp;was huge. It took 52 seconds to scan the table when it's not compressed,&amp;nbsp;but it took only 3 seconds when the table was compressed. Note that when uncompressed, the table had 2264 pages, and when compressed it had 534 pages.&lt;/P&gt;
&lt;P&gt;Two more points to note: First, I did not try to explain why the improvement in table scan performance seemed to be disproportional to the reduction in the table size as the result of page compression. But I did run these tests many times to make sure I was not going to give you incorrect data. Second, I would caution you not to get too hung up on these specific numbers. As they often say, your mileage may vary. Instead, focus on the big picture impression that page compression may give your reporting queries a performance boost. In a real app, life is not so simple, and you would have to strike a balance between better reporting queries and potentially longer batch/data feed processing time when you consider page compression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6835" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/6835.ashx" length="7086" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Data+Compression/default.aspx">Data Compression</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>SQL Server 2008 Page Compression: Performance impact on inserts</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2008/05/12/sql-server-2008-page-compression-performance-impact-on-inserts.aspx</link><pubDate>Tue, 13 May 2008 02:49:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6773</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>5</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/6773.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=6773</wfw:commentRss><description>&lt;P&gt;Before I begin, let me be very clear that the results I report in this post were obtained with SQL Server 2008 CTP6. Microsoft is still working on improving the performance of data compression. And in particular, the performance of inserting into a compressed table is expected to be significantly enhanced in SQL Server 2008 RTM.&lt;/P&gt;
&lt;P&gt;In my previous &lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx"&gt;post&lt;/A&gt;, I have shown that data compression can result in significant savings in storage space. In this post, I want to highlight the fact that not everything comes for free. Let's take a look at inserting into a B-tree table, i.e. a table with a clustered index. What is the performance impact of page compression on inserts? &lt;/P&gt;
&lt;P&gt;Note that you must use TABLOCK hint for pages to receive page-level compression when the pages of a heap table are being populated with the INSERT statement. So, heap tables are much less interesting, and&amp;nbsp;I'll hence focus only on B-tree tables. &lt;/P&gt;
&lt;P&gt;In my tests, I ran the following script:&lt;/P&gt;
&lt;DIV style="BACKGROUND-COLOR:#cccccc;"&gt;&lt;FONT face="Courier New"&gt;truncate table customer2;&lt;BR&gt;-- enable page compression&lt;BR&gt;alter table customer2 rebuild with (data_compression=page);&lt;BR&gt;go&lt;BR&gt;declare @dt datetime;&lt;BR&gt;select @dt = getdate();&lt;BR&gt;insert customer2 select * from customer;&lt;BR&gt;select 'insert into customer2 with compression', datediff(second, @dt, getdate());&lt;BR&gt;go&lt;BR&gt;truncate table customer2;&lt;BR&gt;-- disable compression&lt;BR&gt;alter table customer2 rebuild with (data_compression=none);&lt;BR&gt;go&lt;BR&gt;declare @dt datetime;&lt;BR&gt;select @dt = getdate();&lt;BR&gt;insert customer2 select * from customer;&lt;BR&gt;select 'insert into customer2 without compression', datediff(second, @dt, getdate());&lt;BR&gt;go&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;The script measures the difference in the elapsed time of inserting 3,000,000 rows into (1) an empty table when page compression&amp;nbsp;is enabled, and (2) an empty table when no data compression&amp;nbsp;is enabled. The script was run multiple times to ensure that the elapsed times recorded were consistent. The following chart shows the results:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/6773.ashx"&gt; &lt;/P&gt;
&lt;P&gt;Clearly, the impact of page compression on inserts was rather significant in the tests. Without data compression, inserting 3,000,000 rows took ~80 seconds, whereas it took 217 seconds when page compression was enabled on the target B-tree table. No free lunch!&lt;/P&gt;
&lt;P&gt;Again, these numbers were obtained with SQL Server 2008 CTP6, a work in progress build. I'll re-run the test once SQL Server 2008 RTM is released.&lt;/P&gt;
&lt;P&gt;Now that I have shown that there can be performance penalty in using data compression, next time I'll show that data compression can also help&amp;nbsp;improve your performance.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6773" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/6773.ashx" length="8414" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Data+Compression/default.aspx">Data Compression</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>SQL Server 2008 Page Compression: Compression ratios with real-world databases</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx</link><pubDate>Sun, 11 May 2008 23:20:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6750</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>8</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/6750.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=6750</wfw:commentRss><description>&lt;P&gt;In my &lt;A href="http://sqlblog.com/blogs/linchi_shea/archive/2008/05/05/sql-server-2008-page-compression-using-multiple-processors.aspx"&gt;previous post&lt;/A&gt; on data compression, I looked at how rebuilding a table with page compression works with multiple processors via the MAXDOP option. In this post, I'll focus on what compression ratios&amp;nbsp;I have seen in the real-world databases. Now, if you understand how SQL Server 2008 data compression works, you know that what compression ratio you may get really depends on to what extent SQL Server can find duplicate values on the data/index pages. Consequently, one real-world database can have a very high compression ratio while another may have a very low compression ratio: there is no typical compression ratio to expect.&lt;/P&gt;
&lt;P&gt;That said, it is still interesting to&amp;nbsp;report what compression ratios I have seen with real customer databases instead of 'cooked' data. Before I give the results, let me define what&amp;nbsp;I mean by compression ratio:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT face="Courier New"&gt;&lt;B&gt;Compression Ratio = Uncompressed Size / Compressed Size&lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;To see what kind of compression ratios I may run into with real-world databases, I randomly selected 14 customer databases. IN this blog post, these databases have been renamed to DB1, DB2, ..., DB13, and DB14 to&amp;nbsp;shield their identities. For each database, the following steps were performed:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Record the data size of sp_spaceused for the database. This is the uncompressed data size.&lt;/LI&gt;
&lt;LI&gt;For each user table in the database, rebuild it with page compression. This was done by generating and executing a script that contains the following ALTER TABLE statement for each table:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT face="Courier New"&gt;alter table &amp;lt;the_table&amp;gt; rebuild with (data_compression=page, maxdop=8);&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Record the data size of sp_spaceused for the database. This is the compressed data size.&lt;/LI&gt;
&lt;LI&gt;For each user table in the database, rebuild the table with no compression, which effectively decompresses the table. This was done by generating and executing a script that contains the following ALTER TABLE statement for each table:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT face="Courier New"&gt;alter table &amp;lt;the_table&amp;gt; rebuild with (data_compression=none, maxdop=8);&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Record the data size of sp_spaceused for the database. This is the decompressed data size.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The data size obtained in Step 3 was used as database compressed size, and the data size obtained in Step 5 was used as the database uncompressed size. The data size obtained in Step 1 was not used because it may be polluted by fragmentation. If we used the data size from Step 1, we could potentially be using a size that was inflated by fragmentation, resulting in an incorrectly higher compression ratio.&lt;/P&gt;
&lt;P&gt;The following two charts summarize the results:&lt;/P&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/6750.ashx"&gt; 
&lt;P&gt;The top chart includes the three database space measures mentioned above. As you can see, fragmentation was not a significant factor for these databases since the uncompressed size and decompressed size were quite close for each database. As it turned out, these databases were regularly maintained, including rebuilding clustered indexes, it's no surprise that there wasn't any serious fragmentation.&lt;/P&gt;
&lt;P&gt;To highlight the compressed ratios for these databases, the bottom chart plots the compression ratios. So for these databases, the compression ratios--obtained using SQL Server 2008 CTP6 page compression--vary between 1.7 and 5.6. &lt;/P&gt;
&lt;P&gt;The space savings were substantial with these databases. When decompressed, the total space usage was ~261GB. Compared that to the total space usage of ~88GB when compressed. In other words, SQL Server 2008 page compression would save us 173GB in storage space.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6750" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/6750.ashx" length="16981" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Data+Compression/default.aspx">Data Compression</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Storage/default.aspx">Storage</category></item><item><title>SQL Server 2008 Page Compression: Using multiple processors</title><link>http://sqlblog.com/blogs/linchi_shea/archive/2008/05/05/sql-server-2008-page-compression-using-multiple-processors.aspx</link><pubDate>Mon, 05 May 2008 13:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6627</guid><dc:creator>Linchi Shea</dc:creator><slash:comments>9</slash:comments><comments>http://sqlblog.com/blogs/linchi_shea/comments/6627.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/linchi_shea/commentrss.aspx?PostID=6627</wfw:commentRss><description>&lt;P&gt;SQL Server 2008 has introduced a long sought after feature -- Data Compression. This is a great feature, and I have no doubt it'll be widely used. The key compression method is called page compression, which uses the following three techniques to reduce the space taken up by duplicates on a page: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Row compression. This technique changes the storage formats of many fixed-length datatypes (e.g. char, int, money, binary, datetime, and so on) so that they occupy only the required number of bytes plus a small overhead.&lt;/LI&gt;
&lt;LI&gt;Prefix compression. This technique finds duplicate prefixes on a page for each column , and replaces each duplicate with a small reference number.&lt;/LI&gt;
&lt;LI&gt;Dictionary compression. This technique finds duplicate values on a page, collects them into a dictionary stored after the page header but before the data rows, and replaces the duplicate values with their corresponding offsets in the dictionary.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;You can read more about SQL Server 2008 data compression in SQL2008 CTP6 Books Online. &lt;/P&gt;
&lt;P&gt;In this post, I'll focus on a very specific question: How does the number of processors impact rebuilding a table with page compression? Note that one way to enable page compression on a table is to rebuild it with the option data_compression set to page. The following is an example:&lt;/P&gt;
&lt;DIV style="BACKGROUND-COLOR:#cccccc;"&gt;ALTER TABLE customer REBUILD WITH (DATA_COMPRESSION=PAGE);&lt;/DIV&gt;
&lt;P&gt;Since compressing a table is a CPU intensive operation, one naturally would expect that using multiple processors should help reduce the elapsed time of the above command. How do you instruct SQL Server 2008 to take advantage of multiple processors? There exists another rebuild option called MAXDOP, which you can use to inform SQL Server of the max number of processors you want the rebuild to use. The following is an example of setting the MAXDOP option to 8:&lt;/P&gt;
&lt;DIV style="BACKGROUND-COLOR:#cccccc;"&gt;ALTER TABLE customer REBUILD WITH (DATA_COMPRESSION=PAGE, MAXDOP=8);&lt;/DIV&gt;
&lt;P&gt;To find out the impact of multiple processors (or the impact of setting MAXDOP to different values) on the elapsed time of the above command, I ran a series of tests with the command by setting MAXDOP to 0, 1, 2, 3, 4, 5, 6, 7, and 8 in turn. Before I report the test results, I should give you some information about the test setup:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The TPC-C customer table was used to produce all the test results reported here. However, the original customer table in the TPC-C benchmark was not very compressible because its data didn't include many duplicates. For test purposes, I 'cooked' the table to make it more compressible. After I cooked it, the data size of the table was ~2,181,864KB without data compression, and was ~439,672KB with page compression.&lt;/LI&gt;
&lt;LI&gt;The test server had 8 processors (with four dual-core sockets), and 8GB physical memory.&lt;/LI&gt;
&lt;LI&gt;The data point for each MAXDOP setting was collected with the following T-SQL script. While only MAXDOP = 2 is shown below, in the test, this script was repeated for each of the MAXDOP values 0 through 8.&lt;/LI&gt;&lt;/UL&gt;
&lt;DIV style="BACKGROUND-COLOR:#cccccc;"&gt;&lt;FONT face="Courier New"&gt;exec sp_spaceused 'customer';&lt;BR&gt;go&lt;BR&gt;DBCC DROPCLEANBUFFERS&lt;BR&gt;GO&lt;BR&gt;declare @dt datetime;&lt;BR&gt;select @dt = getdate();&lt;BR&gt;alter table customer rebuild with (data_compression=page, maxdop=2);&lt;BR&gt;select 'maxdop = 2', datediff(second, @dt, getdate());&lt;BR&gt;go&lt;BR&gt;exec sp_spaceused 'customer';&lt;BR&gt;go&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;The following chart summarizes how the MAXDOP setting affects the elapsed time of rebuilding the customer table with page compression.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://sqlblog.com/blogs/linchi_shea/attachment/6627.ashx"&gt; &lt;/P&gt;
&lt;P&gt;A number of observations should be noted:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SQL Server 2008 page compression can effectively take advantage of multiple processors to speed up rebuilding a table. Using more processors generally leads to shorter elapsed time.&lt;/LI&gt;
&lt;LI&gt;The diminishing return on the number of processors is clear from the chart. In this particular test environment, after 5 or 6 processors, adding another processor to rebuilding the table with page compression only reduced the elapsed time only marginally. The largest improvement was obtained when the number of processors was increased from one to two.&lt;/LI&gt;
&lt;LI&gt;When the MAXDOP option was set to 0, its effect was the same as when it's set to 8, which happened to be the total number of processors on the server.&lt;/LI&gt;
&lt;LI&gt;For this test setup, changing the buffer pool size from 6GB to 2GB did not materially alter the test results.&lt;/LI&gt;
&lt;LI&gt;With MAXDOP=8, all eight processors were seen to be used 100%--as reported by the perfmon counter Processor\% Processor Time--during the table rebuild.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=6627" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/linchi_shea/attachment/6627.ashx" length="6208" type="image/gif" /><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Data+Compression/default.aspx">Data Compression</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/linchi_shea/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item></channel></rss>