<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://consultingblogs.emc.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>Claypole's World - The SQL Server Side</title><link>http://consultingblogs.emc.com/jamesrowlandjones/default.aspx</link><description>Concerning development of bespoke applications and database administration.</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Focus on Fast Track : My SQLBits VI Presentation</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2010/04/25/focus-on-fast-track-my-sqlbits-vi-presentation.aspx</link><pubDate>Sun, 25 Apr 2010 20:01:12 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:17145</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/17145.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=17145</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=17145</wfw:comment><description>&lt;p&gt;For those of you interested in the principles of Fast Track I thought it’d be worth putting out my &lt;a href="http://www.sqlbits.com/Agenda/event6/Fast_Track_Foundations__Get_Serious_about_Sequential_I_O/default.aspx" target="_blank"&gt;SQLBits VI&lt;/a&gt; presentation slide deck on my blog. It will of course be available from the &lt;a href="http://www.sqlbits.com" target="_blank"&gt;SQLBits&lt;/a&gt; website in due course. In about 6 weeks time that will be the better resource as the session recordings will be available at that time. Only then will you be able to truly relive the JRJ and &lt;a href="http://www.sqlbits.com/Gallery/Images/SpeakerPhotos/102_0020.JPG" target="_blank"&gt;naked Neo&lt;/a&gt; experience. I expect both these resources (the slides and the session recording) will be available from &lt;a href="http://www.sqlbits.com/Agenda/event6/Fast_Track_Foundations__Get_Serious_about_Sequential_I_O/default.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;For now though you’ll have to make do with the slides.&amp;#160; &lt;a href="http://consultingblogs.emc.com/simonmunro/" target="_blank"&gt;Simon Munro&lt;/a&gt; upped the ante with some natty embed from Slide Share. Imitation is still the best form of flattery (even though his slides are way cooler) and so I have gone for something remarkably similar.&lt;/p&gt;  &lt;div style="width:425px;" id="__ss_3850476"&gt;&lt;strong style="margin:12px 0px 4px;display:block;"&gt;&lt;a title="Fast track foundations getting serious about sequential io" href="http://www.slideshare.net/jrowlandjones/fast-track-foundations-getting-serious-about-sequential-io"&gt;Fast track foundations getting serious about sequential io&lt;/a&gt;&lt;/strong&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=fasttrackfoundationsgettingseriousaboutsequentialio-100425142644-phpapp02&amp;amp;stripped_title=fast-track-foundations-getting-serious-about-sequential-io" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=fasttrackfoundationsgettingseriousaboutsequentialio-100425142644-phpapp02&amp;amp;stripped_title=fast-track-foundations-getting-serious-about-sequential-io" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;    &lt;div style="padding-bottom:12px;padding-left:0px;padding-right:0px;padding-top:5px;"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/jrowlandjones"&gt;jrowlandjones&lt;/a&gt;.&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Finally a big thank you to my friend and &lt;a href="http://www.sqlbits.com/about/WhosWho.aspx" target="_blank"&gt;SQLBits Committee&lt;/a&gt; colleague &lt;a href="http://www.konesans.com" target="_blank"&gt;Allan Mitchell&lt;/a&gt; for teaming up with me and providing the SSIS demonstrations that formed the second half of this presentation.&amp;#160; He might think I have a slightly perverse interpretation of the word “team” after being subjected to persistent name calling throughout my section of the presentation. Actually I think he rather enjoyed it… Although it’s not often you see &lt;a href="http://www.sqlis.com" target="_blank"&gt;Allan&lt;/a&gt; struggling for words. :o)&amp;#160; See for yourself when the videos are released on &lt;a href="http://www.sqlbits.com"&gt;www.sqlbits.com&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;Cheers, JRJ &lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=17145" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Fast+Track+Data+Warehousing/default.aspx">Fast Track Data Warehousing</category></item><item><title>Focus on Fast Track : Understanding the –E Startup Parameter</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2010/04/25/focus-on-fast-track-understanding-the-e-startup-parameter.aspx</link><pubDate>Sun, 25 Apr 2010 06:12:42 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:17139</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>5</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/17139.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=17139</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=17139</wfw:comment><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;One of my focuses at the moment is the work that Microsoft have done with various hardware providers to deliver “Fast Track” – A reference architecture for SQL Server Data Warehousing that delivers predictable blistering performance on prescribed commodity hardware. Sounds great I think you’ll agree.&amp;#160; What is even better is that the architecture comes with a series of best practices on how to make the most of your Fast Track system.&amp;#160; &lt;/p&gt;  &lt;p&gt;As you might expect there are some SQL Server settings you need to change to make.&amp;#160; However, I am impressed by the fact that the team have gone further than this.&amp;#160; There is also a focus on the build of your solution and how you should load data into a Fast Track Data Warehouse.&lt;/p&gt;  &lt;p&gt;It’s inspired me to get blogging again and I’ve decided to write a series called “Focus on Fast Track”.&amp;#160; This should follow on nicely for those of you who attended my session at SQLBits VI entitled “Fast Track Foundations : Serious about Sequential I/O”. If you didn’t see this presentation it shouldn’t matter too much – especially as all the sessions are recorded at SQLBits and are made available for free over the internet once all the editing / post production work has been done.&amp;#160; &lt;/p&gt;  &lt;p&gt;Fast Track is important an important step for Microsoft. They are helping customers get the most from SQL Server and not just from the software perspective.&amp;#160; What is being offered is clear deployment solution for data warehousing.&amp;#160; Tackling the physical deployment challenge with real hardware specifications is a big step forward. I hope it is the first of many.&lt;/p&gt;  &lt;p&gt;In this first post I’d like to talk about one of the recommended settings for SQL Server in a Fast Track System.&amp;#160; The use of the –E startup parameter. Actually its very relevant to all SQL Server Data Warehousing scenarios.&amp;#160; It has also had a chequered past in terms of how this parameter has been documented. I’d therefore like to try and bring a new insight into what this parameter does but also why it is important.&lt;/p&gt;  &lt;h1&gt;Life without –E&lt;/h1&gt;  &lt;p&gt;Before identifying what –E does or doesn’t do I think it would be helpful to clearly state what happens when –E has not been configured on a SQL Server.&lt;/p&gt;  &lt;p&gt;Imagine a Database with a Primary and Secondary File Group. The Primary contains a single file and only holds the internal tables etc and the secondary hold the user data.&amp;#160; The secondary file group contains multiple files that are evenly sized and spread across multiple LUNs.&amp;#160; It would look something like the database below.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;CREATE DATABASE &lt;/span&gt;[EParam] &lt;span style="color:blue;"&gt;ON  PRIMARY 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam.mdf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;51200KB 
    &lt;span style="color:gray;"&gt;,&lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;) 
    ,&lt;/span&gt;FILEGROUP [Data]  &lt;span style="color:blue;"&gt;DEFAULT 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam1'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam1.ndf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;10240KB 
    &lt;span style="color:gray;"&gt;,&lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB
    &lt;span style="color:gray;"&gt;)
    ,
    (&lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam2'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam2.ndf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;10240KB 
    &lt;span style="color:gray;"&gt;,&lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;)
    ,
    (&lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam3'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam3.ndf'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;10240KB 
    &lt;span style="color:gray;"&gt;,&lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB
    &lt;span style="color:gray;"&gt;)
    , 
    (&lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam4'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam4.ndf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;10240KB 
    &lt;span style="color:gray;"&gt;,&lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB
    &lt;span style="color:gray;"&gt;)
&lt;/span&gt;&lt;span style="color:magenta;"&gt;LOG &lt;/span&gt;&lt;span style="color:blue;"&gt;ON 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam_log'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam_log.ldf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;,&lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;2048GB 
    &lt;span style="color:gray;"&gt;,&lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;10&lt;span style="color:gray;"&gt;%
    )&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;When a database has been laid out as above SQL Server will use “a round robin proportional fill” algorithm to evenly distribute the data.&amp;#160; Every time a table requests an extent from SQL Server it will be satisfied by allocating an extent from the next file in the filegroup. This ensures that the files fill up evenly. Note the round robin is not determined at the table level.&amp;#160; We can see this in the following example script.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;Use &lt;/span&gt;EParam

&lt;span style="color:blue;"&gt;Create Table &lt;/span&gt;NoET1 &lt;span style="color:gray;"&gt;(&lt;/span&gt;ECol1 &lt;span style="color:blue;"&gt;char&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;8000&lt;span style="color:gray;"&gt;)) &lt;/span&gt;&lt;span style="color:blue;"&gt;ON &lt;/span&gt;Data&lt;span style="color:gray;"&gt;;
&lt;/span&gt;&lt;span style="color:blue;"&gt;Create Table &lt;/span&gt;NoET2 &lt;span style="color:gray;"&gt;(&lt;/span&gt;ECol1 &lt;span style="color:blue;"&gt;char&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;8000&lt;span style="color:gray;"&gt;)) &lt;/span&gt;&lt;span style="color:blue;"&gt;ON &lt;/span&gt;Data&lt;span style="color:gray;"&gt;;

&lt;/span&gt;&lt;span style="color:blue;"&gt;declare &lt;/span&gt;@cnt &lt;span style="color:blue;"&gt;int &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;0

&lt;span style="color:blue;"&gt;While &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;&amp;lt;&lt;/span&gt;8
&lt;span style="color:blue;"&gt;BEGIN
    Insert into &lt;/span&gt;NoET1
    &lt;span style="color:blue;"&gt;Values &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:magenta;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:red;"&gt;'X'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;8000&lt;span style="color:gray;"&gt;));
    
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Set &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;= &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;+&lt;/span&gt;1
&lt;span style="color:blue;"&gt;END
GO
declare &lt;/span&gt;@cnt &lt;span style="color:blue;"&gt;int &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;0

&lt;span style="color:blue;"&gt;While &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;&amp;lt;&lt;/span&gt;8
&lt;span style="color:blue;"&gt;BEGIN
    Insert into &lt;/span&gt;NoET2
    &lt;span style="color:blue;"&gt;Values &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:magenta;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:red;"&gt;'X'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;8000&lt;span style="color:gray;"&gt;));
    
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Set &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;= &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;+&lt;/span&gt;1
&lt;span style="color:blue;"&gt;END
GO
declare &lt;/span&gt;@cnt &lt;span style="color:blue;"&gt;int &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;0

&lt;span style="color:blue;"&gt;While &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;&amp;lt;&lt;/span&gt;8
&lt;span style="color:blue;"&gt;BEGIN
    Insert into &lt;/span&gt;NoET1
    &lt;span style="color:blue;"&gt;Values &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:magenta;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:red;"&gt;'X'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;8000&lt;span style="color:gray;"&gt;));
    
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Set &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;= &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;+&lt;/span&gt;1
&lt;span style="color:blue;"&gt;END
GO
declare &lt;/span&gt;@cnt &lt;span style="color:blue;"&gt;int &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;0

&lt;span style="color:blue;"&gt;While &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;&amp;lt;&lt;/span&gt;8
&lt;span style="color:blue;"&gt;BEGIN
    Insert into &lt;/span&gt;NoET2
    &lt;span style="color:blue;"&gt;Values &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:magenta;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:red;"&gt;'X'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;8000&lt;span style="color:gray;"&gt;));
    
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Set &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;= &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;+&lt;/span&gt;1
&lt;span style="color:blue;"&gt;END&lt;/span&gt;&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color:green;"&gt;--and so on&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;I’ll use the excellent &lt;a href="http://internalsviewer.codeplex.com" target="_blank"&gt;Internals Viewer&lt;/a&gt; to illustrate what has happened.&lt;/p&gt;

&lt;p&gt;&lt;span style="color:green;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_5CCC7B24.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_616285DE.png" width="680" height="369" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Each time a new extent has been required it has been granted from the next data file in the sequence. This has kept the data distribution even.&lt;/p&gt;

&lt;p&gt;If prop fill operated at the table level then the NoET1 (blue purple) table would have data in all four files but it does not.&lt;/p&gt;

&lt;h2&gt;The Gaps (Slight Tangent)&lt;/h2&gt;

&lt;p&gt;You may be wondering why there is a couple of odd looking things going on in the picture above.&amp;#160; Lets look at file 5 as a good example.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Why are the first set of squares empty? &lt;/li&gt;

  &lt;li&gt;Why are there holes and mixed colours at the start of the allocation process but not at the end &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_4649B6D0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_06139D56.png" width="608" height="239" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;At the beginning of every file is a bunch of pages that define the file. They are the File Header(5:0), PFS(5:1), GAM(5:2), SGAM(5:3), DCM(5:6) and BCM(5:7) pages. The numbers in brackets relate to the (File Number : Page Number). That takes care of the first eight grey squares.&amp;#160; (5:4) and (5:5) are not allocated.&lt;/p&gt;

&lt;p&gt;The reason the next extent has three colours is because it is a mixed extent. It contains one page from NoET1, six pages from NoET2 and an IAM page. &lt;/p&gt;

&lt;p&gt;IAM pages are distributed as needed through files and manage the extents for a 4 GB range in a given database file for a given allocation unit.&amp;#160; Each Table can have up to three types of allocation unit associated with it – IN_ROW_DATA, LOB_DATA, ROW_OVERFLOW_DATA. All our Rows are IN_ROW_DATA. Furthermore, you will get one IAM page for each file on which an allocation unit has extents.&lt;/p&gt;

&lt;p&gt;So in our case lets quickly look at NoET1. This table only contains IN_ROW_DATA and so is associated with a single allocation unit.&amp;#160; However, it contains data in three files so we have 3 IAM Pages for this table.&lt;/p&gt;

&lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Abbreviation&lt;/strong&gt;&lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;Meaning&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;GAM&lt;/td&gt;

      &lt;td&gt;Global Allocation Map&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;
        &lt;p style="margin-right:0px;" dir="ltr"&gt;SGAM&lt;/p&gt;
      &lt;/td&gt;

      &lt;td&gt;Shared Global Allocation Map&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;DCM&lt;/td&gt;

      &lt;td&gt;Differential Change Map&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;BCM&lt;/td&gt;

      &lt;td&gt;Bulk Changed Map&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;PFS&lt;/td&gt;

      &lt;td&gt;Page Free Space&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Mixed Extents, GAM, SGAM, DCM, BCM and IAM pages are all covered in books online &lt;a href="http://technet.microsoft.com/en-us/library/cc280360.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;Where is the Confusion?&lt;/h1&gt;

&lt;p&gt;The functionality of –E I don’t believe has been completely documented. There is a subtlety to how –E works that hasn’t in my view been adequately described. Even the Fast Track paper references an incorrect/out of date KB Article.&amp;#160; Let’s just highlight the sources of incorrect info and look at what they say.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd459178.aspx" target="_blank"&gt;Fast Track White Paper&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;KB Article &lt;a href="http://support.microsoft.com/kb/329526" target="_blank"&gt;329526&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://consultingblogs.emc.com/jamesrowlandjones/archive/2008/03/16/sql-2k5-enterprise-edition-mini-feature-1-e-startup-option.aspx" target="_blank"&gt;My Blog&lt;/a&gt; :o( &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd459178.aspx" target="_blank"&gt;Data Loading Performance Guide&lt;/a&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Fast Track White Paper&lt;/h2&gt;

&lt;p&gt;For the clarity of the post I've copied verbatim what the &lt;a href="http://msdn.microsoft.com/en-us/library/dd459178.aspx" target="_blank"&gt;Fast Track White Paper&lt;/a&gt; says:&lt;/p&gt;

&lt;p&gt;“&lt;strong&gt;-E &lt;/strong&gt;should be added to the start-up options. This increases the number of contiguous extents in each file that are allocated to a database table as it grows. This improves sequential disk access. Microsoft Knowledge Base Article &lt;a href="http://support.microsoft.com/kb/329526" target="_blank"&gt;329526&lt;/a&gt; describes the &lt;b&gt;-E&lt;/b&gt; option in more detail.”&lt;/p&gt;

&lt;p&gt;What is wrong with this statement? –E does &lt;strong&gt;not&lt;/strong&gt; increase the number of contiguous extents in each file that are allocated to a table.&amp;#160; Maybe it should – interesting argument -&amp;#160; but it does not. &lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h2&gt;KB Article 329526&lt;/h2&gt;

&lt;p&gt;The source: &lt;a href="http://support.microsoft.com/kb/329526" target="_blank"&gt;329526&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;“The default allocation mechanism allocates one extent per file, using a round robin proportional fill factor algorithm, before it switches to the next file in the filegroup. 
  &lt;br /&gt;In the SQL Server 64-bit release, you can allocate four consecutive extents per given file, before switching to the next file in the filegroup.”&lt;/p&gt;

&lt;p&gt;So what is wrong with this statement? You do not allocate four consecutive extents per given file before switching to the next file in the filegroup. Certainly not on SQL Server 2008. This KB article hasn’t been updated to say it covers 2008 but I don’t believe the code here changed. I would ignore this KB Article completely.&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h2&gt;My Blog&lt;/h2&gt;

&lt;p&gt;The SQL Gods may strike me down for this one. Rule no.1 don’t believe everything you read.&amp;#160; I’d referenced &lt;a href="http://support.microsoft.com/kb/329526" target="_blank"&gt;329526&lt;/a&gt; for a series of posts about enterprise options but clearly hadn’t tested this one properly. Naughty Claypole. I would ignore this &lt;a href="http://consultingblogs.emc.com/jamesrowlandjones/archive/2008/03/16/sql-2k5-enterprise-edition-mini-feature-1-e-startup-option.aspx" target="_blank"&gt;post&lt;/a&gt; if I were you.&lt;/p&gt;

&lt;h2&gt;Data Loading Performance Guide&lt;/h2&gt;

&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/dd425070.aspx" target="_blank"&gt;Data Loading Performance Guide&lt;/a&gt; says the following about –E :&lt;/p&gt;

&lt;p&gt;“When SQL Server bulks load into a table allocated to this filegroup, extents are allocated in a round robin fashion. In the default configuration, SQL Server allocates one extent to each file before moving to the next in the chain. It is possible to increase this to 64 extents using the –E startup flag.”&lt;/p&gt;

&lt;table border="1" cellspacing="0" cellpadding="2" width="399"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;File&lt;/strong&gt;&lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;Default Extent&lt;/strong&gt; &lt;strong&gt;Allocation&lt;/strong&gt;&lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;With –E Startup&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;0&lt;/td&gt;

      &lt;td&gt;Extent 1&lt;/td&gt;

      &lt;td&gt;1-64&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;

      &lt;td&gt;
        &lt;p style="margin-right:0px;" dir="ltr"&gt;Extent 2&lt;/p&gt;
      &lt;/td&gt;

      &lt;td&gt;65-128&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;0&lt;/td&gt;

      &lt;td&gt;Extent 3&lt;/td&gt;

      &lt;td&gt;129-192 &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;

      &lt;td&gt;Extent 4&lt;/td&gt;

      &lt;td&gt;193-256&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;etc&lt;/td&gt;

      &lt;td&gt;etc&lt;/td&gt;

      &lt;td&gt;etc&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;This is easily the closest to the actual answer. I’d say the wording&amp;#160; “It is possible to increase this to 64 extents using the –E startup flag” is slightly ambiguous and doesn’t deal with a small subtlety which is what I hope to show you in the next section. Suffice it to say that SQL Server does not increase the allocation to 64 extents when –E has been enabled.&amp;#160; Remember an allocation means a reservation. If a table received 64 extents every time it received an allocation then the Total pages column in &lt;a href="http://msdn.microsoft.com/en-us/library/ms189792.aspx" target="_blank"&gt;sys.allocation_units&lt;/a&gt; would be increased by 512 pages. It does not. &lt;/p&gt;

&lt;h1&gt;So what does –E do?&lt;/h1&gt;

&lt;p&gt;-E changes the rate at which the proportional fill occurs. The Data Loading Performance Guide alludes to this – especially in the table.&amp;#160; Rather than moving to the next file after a single extent allocation the movement occurs after 64 extents have been allocated.&amp;#160; These extent allocations do not need to come from a single table. If I was loading two tables in parallel for example and had –E enabled then both tables would consume those 64 extents in the single file before moving on to the next file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-E does not alter the fact that SQL Server allocates one extent at a time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Therefore when –E is enabled you will only see Total Pages increase by 8 pages (1 extent) every time an allocation occurs.&lt;/p&gt;

&lt;p&gt;That sounds like I might be splitting hairs but I believe the distinction is important to understand. It is especially important for Fast Track as Fast Track is completely dependent on sequential I/O for its performance. –E is enabled to enhance the sequential scanning performed in a read-ahead so that more data is contiguously available in a single file.&amp;#160; If two tables that share the same files/filegroup are loaded in parallel then the advantage of –E is removed. The extents will be fragmented and this will in turn reduce the performance of the read-ahead.&lt;/p&gt;

&lt;p&gt;Now to show that I have learned my lesson. Here comes the proof.&lt;/p&gt;

&lt;h1&gt;&lt;/h1&gt;

&lt;h1&gt;&lt;/h1&gt;

&lt;h1&gt;Proving –E Functionality&lt;/h1&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;First of all we need to enable the –E startup parameter.&amp;#160; You can do this by amending the startup parameters on the SQL Server Service.&amp;#160; You should be using SQL Server Configuration Manager to do this.&lt;/p&gt;

&lt;h2&gt;Step 1 : Enable –E Startup Parameter&lt;/h2&gt;

&lt;p&gt;I have actually documented setting the –E startup parameter in another &lt;a href="http://consultingblogs.emc.com/jamesrowlandjones/archive/2010/04/23/enabling-sql-server-start-up-parameters-a-couple-of-pitfalls.aspx" target="_blank"&gt;post&lt;/a&gt;. There are a couple of pitfalls that I thought were worth bringing out and so if you are unsure about setting Startup Parameters I’d urge you to read it. It includes a step by step guide to setting this correctly (yes you can set it incorrectly).&lt;/p&gt;

&lt;p&gt;However, if you just want to get on with the show make sure you set your startup parameter with exactly &lt;strong&gt;;-E &lt;/strong&gt;at the end of your list of Startup Parameters on the Startup parameter property of the SQL Server Service by using SQL Server Configuration Manager.&lt;/p&gt;

&lt;h2&gt;Step 2 : Create a multi file database&lt;/h2&gt;

&lt;p&gt;Something like this should be fine.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;CREATE DATABASE &lt;/span&gt;[EParam] &lt;span style="color:blue;"&gt;ON  PRIMARY 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;( &lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam.mdf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;51200KB 
    &lt;span style="color:gray;"&gt;, &lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;)
, &lt;/span&gt;FILEGROUP [Data]  &lt;span style="color:blue;"&gt;DEFAULT 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;( &lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam1'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam1.ndf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;10240KB 
    &lt;span style="color:gray;"&gt;, &lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;)
    , 
    ( &lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam2'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam2.ndf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;10240KB 
    &lt;span style="color:gray;"&gt;, &lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;)
    , 
    ( &lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam3'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam3.ndf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;10240KB 
    &lt;span style="color:gray;"&gt;, &lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;)
    , 
    ( &lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam4'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam4.ndf' 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;10240KB 
    &lt;span style="color:gray;"&gt;, &lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:blue;"&gt;UNLIMITED
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;)
     &lt;/span&gt;&lt;span style="color:magenta;"&gt;LOG &lt;/span&gt;&lt;span style="color:blue;"&gt;ON 
    &lt;/span&gt;&lt;span style="color:gray;"&gt;( &lt;/span&gt;NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'EParam_log'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="color:blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'C:\Temp\EParam_log.ldf'
    &lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;SIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;1024KB 
    &lt;span style="color:gray;"&gt;, &lt;/span&gt;MAXSIZE &lt;span style="color:gray;"&gt;= &lt;/span&gt;2048GB 
    &lt;span style="color:gray;"&gt;, &lt;/span&gt;FILEGROWTH &lt;span style="color:gray;"&gt;= &lt;/span&gt;10&lt;span style="color:gray;"&gt;%
    )
&lt;/span&gt;&lt;span style="color:blue;"&gt;GO&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;Step 3 : Create two tables&lt;/h2&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;Create Table &lt;/span&gt;ETestTable &lt;span style="color:gray;"&gt;(&lt;/span&gt;ECol1 &lt;span style="color:blue;"&gt;char&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;8000&lt;span style="color:gray;"&gt;)) &lt;/span&gt;&lt;span style="color:blue;"&gt;ON &lt;/span&gt;Data&lt;span style="color:gray;"&gt;;
&lt;/span&gt;&lt;span style="color:blue;"&gt;Create Table &lt;/span&gt;ETestTable2 &lt;span style="color:gray;"&gt;(&lt;/span&gt;ECol1 &lt;span style="color:blue;"&gt;char&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;8000&lt;span style="color:gray;"&gt;)) &lt;/span&gt;&lt;span style="color:blue;"&gt;ON &lt;/span&gt;Data&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Internals Viewer shows that the database is still empty. As no data has yet been added nothing has been allocated.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_04CF0477.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_46863A05.png" width="676" height="380" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;Step 4 : Load in 64 extents of data into ETestTable&lt;/h2&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;declare &lt;/span&gt;@cnt &lt;span style="color:blue;"&gt;int &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;0

&lt;span style="color:blue;"&gt;While &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;&amp;lt;&lt;/span&gt;504
&lt;span style="color:blue;"&gt;BEGIN
    Insert into &lt;/span&gt;ETestTable
    &lt;span style="color:blue;"&gt;Values &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:magenta;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:red;"&gt;'X'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;8000&lt;span style="color:gray;"&gt;));
    
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Set &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;= &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;+&lt;/span&gt;1
&lt;span style="color:blue;"&gt;END&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Internals Viewer shows that all 504 records went into a single file. The round robin has not yet kicked in.&amp;#160; We load in 504 records because the first extent is mixed extent and our first 8 page requests will be allocated to mixed extents. The situation gets slightly muddled as one of the pages in the first extent is an IAM page meaning that we spill over into a second mixed extent. Therefore the first TWO extents allocated will be mixed extents. However, the 9th page request will allocate a uniform extent as we can see below.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_523B8137.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_5D849574.png" width="676" height="355" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;Step 5 : Load another 64 extents of data into ETestTable&lt;/h2&gt;

&lt;p&gt;This time we have no issue. We can happily load in 512 records for our 64 extents.&lt;/p&gt;

&lt;p&gt;Internals Viewer shows us that EParam3 has allocated all the extents. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_46761438.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_1CB29945.png" width="676" height="355" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Clearly then we can see 64 extents being allocated from one file before the prop fill round robin kicks in.&lt;/p&gt;

&lt;p&gt;However, notice that there is no IAM page in&amp;#160; the EParam3 file. Where is it?&lt;/p&gt;

&lt;p&gt;Well it is actually in the mixed extent on EParam4.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_27FBAD82.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_76ACC321.png" width="676" height="355" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;The two pages I have highlighted in the image above are the IAM Pages.&amp;#160; The first IAM page on the left handles allocations from IN_ROW_DATA for ETestTable in the EParam4 file and the IAM page on the right handles IN_ROW_DATA extent allocations from ETestTable in the EParam3 data file.&lt;/p&gt;

&lt;h2&gt;Step 6 : Parallel Load Two Tables&lt;/h2&gt;

&lt;h3&gt;Step 6a : Load 64 Extents into second table &lt;/h3&gt;

&lt;p&gt;First of all let’s even up proceedings and do an initial load into even things up.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;declare &lt;/span&gt;@cnt &lt;span style="color:blue;"&gt;int &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;0

&lt;span style="color:blue;"&gt;While &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;&amp;lt;&lt;/span&gt;512
&lt;span style="color:blue;"&gt;BEGIN
    Insert into &lt;/span&gt;ETestTable2
    &lt;span style="color:blue;"&gt;Values &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:magenta;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:red;"&gt;'X'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;8000&lt;span style="color:gray;"&gt;));
    
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Set &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;= &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;+&lt;/span&gt;1
&lt;span style="color:blue;"&gt;END&lt;/span&gt;&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_59E3283F.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_2FB37A57.png" width="638" height="337" /&gt;&lt;/a&gt;&lt;/pre&gt;

&lt;p&gt;This time we can load in 512 pages in our first attempt to get to a full 64 extents because the previously allocated mixed extents have consumed 5 of our initial 8 page requests. Also note that ETestTable2 needs 2 IAM pages as the data has now spread into two files.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_687DAE57.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_6BCF2032.png" width="637" height="334" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Step 6b : Parallel load ETestTable and ETestTable2 with 32 Extents each&lt;/h3&gt;

&lt;p&gt;To simulate the parallel load I’ve inserted a row for each table in the following script and halved the number of loops:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;declare &lt;/span&gt;@cnt &lt;span style="color:blue;"&gt;int &lt;/span&gt;&lt;span style="color:gray;"&gt;= &lt;/span&gt;0

&lt;span style="color:blue;"&gt;While &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;&amp;lt;&lt;font color="#000000"&gt;256&lt;/font&gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;BEGIN
    Insert into &lt;/span&gt;ETestTable
    &lt;span style="color:blue;"&gt;Values &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:magenta;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:red;"&gt;'X'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;8000&lt;span style="color:gray;"&gt;));
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Insert into &lt;/span&gt;ETestTable2
    &lt;span style="color:blue;"&gt;Values &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:magenta;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:red;"&gt;'X'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;8000&lt;span style="color:gray;"&gt;));    
    &lt;/span&gt;&lt;span style="color:blue;"&gt;Set &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;= &lt;/span&gt;@cnt &lt;span style="color:gray;"&gt;+&lt;/span&gt;1
&lt;span style="color:blue;"&gt;END&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;What are the results? &lt;/p&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_1345EC9D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_767C51BA.png" width="655" height="344" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;We have a striped and perfectly interleaved set of extents.&amp;#160; &lt;/p&gt;

&lt;p&gt;Clearly then –E does not allocate any more than one extent at a time and does nothing to protect this situation from occurring.&lt;/p&gt;

&lt;p&gt;For completeness let’s just see where those IAM Pages are:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_0080CD19.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_1CCE0F39.png" width="657" height="348" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;They are of course in that mixed extent that we used earlier.&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;h1&gt;&lt;/h1&gt;

&lt;h1&gt;Conclusion&lt;/h1&gt;

&lt;p&gt;So there we have it. Clearly –E does not allocate more than one extent at a time. The change made to SQL Server by adding it as a startup parameter is that round robin behaviour in the &lt;a href="http://msdn.microsoft.com/en-us/library/ms187501.aspx" target="_blank"&gt;proportional fill&lt;/a&gt; algorithm has been affected. The round robin does not change files until 64 extents have been allocated from a single file.&lt;/p&gt;

&lt;p&gt;Many thanks to &lt;a href="http://sqlcat.com/members/tkejser.aspx" target="_blank"&gt;Thomas Kejser&lt;/a&gt; for his help and to &lt;a href="http://henkvandervalk.com/" target="_blank"&gt;Henk van der Valk&lt;/a&gt; for suggesting Internals Viewer as the best way to showcase this behaviour.&lt;/p&gt;

&lt;p&gt;In my next post in the &lt;a href="http://consultingblogs.emc.com/tags/Fast+Track+Data+Warehousing/default.aspx" target="_blank"&gt;Focus on Fast Track&lt;/a&gt; series I will look at the implications of –E before moving on to look at Sequential I/O and the impact –E has on it.&lt;/p&gt;

&lt;p&gt;Until the next time,&lt;/p&gt;

&lt;p&gt;JRJ&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=17139" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Data+Warehousing/default.aspx">Data Warehousing</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Fast+Track+Data+Warehousing/default.aspx">Fast Track Data Warehousing</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Startup+Parameters/default.aspx">Startup Parameters</category></item><item><title>Enabling SQL Server Start-up Parameters – A Couple of Pitfalls</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2010/04/23/enabling-sql-server-start-up-parameters-a-couple-of-pitfalls.aspx</link><pubDate>Fri, 23 Apr 2010 07:55:16 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:17134</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>1</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/17134.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=17134</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=17134</wfw:comment><description>&lt;p&gt;In SQL Server there are a couple of ways to set startup parameters:&amp;#160; &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;SQL Server Configuration Manager &lt;/li&gt;    &lt;li&gt;Command Prompt Net start &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Of these only one can be relied upon as a permanent option. That is the Configuration Manager.&amp;#160; I have been toying with startup parameters recently as part of my interest in Fast Track Data Warehousing. I have noticed there are a couple of things you really need to be mindful of when setting these values.&lt;/p&gt;  &lt;p&gt;To illustrate these little gotchas I thought it would be worth while stepping through a scenario whilst configuring the –E startup parameter.&lt;/p&gt;  &lt;h2&gt;How To : Enable –E&lt;/h2&gt;  &lt;p&gt;Below are the steps you need to follow:&lt;/p&gt;  &lt;h3&gt;Step 1 : Fire Up SQL Server Configuration Manager&lt;/h3&gt;  &lt;p&gt;Start &amp;gt;&amp;gt; All Programs &amp;gt;&amp;gt; Microsoft SQL Server 2008 &amp;gt;&amp;gt; Configuration Tools &amp;gt;&amp;gt; SQL Server Configuration Manager &lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_57E3295E.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_665E2583.png" width="657" height="525" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;Step 2: Right Click on SQL Server Service and Select Advanced Tab&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image4_29797DE4.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image4_thumb_568E6AB2.png" width="590" height="654" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;Step 3 : Click on the drop down arrow and update the Start-up Parameter property&lt;/h3&gt;  &lt;p&gt;To set the –E parameter tack &lt;strong&gt;;-E &lt;/strong&gt;to the end of the list of startup parameters&lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image8_1CDBAAFB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image8_thumb_49F097C9.png" width="576" height="431" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;Step 4 : Click on Apply and then Clear the warning box&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image30_3928ED1B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image30_thumb_663DD9E9.png" width="534" height="591" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click Apply&lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image18_3B35C617.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image18_thumb_4F4EE2A0.png" width="537" height="183" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click OK&lt;/p&gt;  &lt;h3&gt;Step 5 : Click on the Logon Tab&amp;#160; and Restart SQL Server by clicking on the “Restart” button&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image24_4E0A49C1.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image24_thumb_4CC5B0E2.png" width="533" height="589" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;&lt;/h2&gt;  &lt;h2&gt;So What’s the Problem? Where are the gotchas?&lt;/h2&gt;  &lt;p&gt;Assuming you followed Steps above EXACTLY then nothing will be wrong and –E will work perfectly well for you.&lt;/p&gt;  &lt;p&gt;However, gotchas do exist.&amp;#160; Look back at Step 3&lt;/p&gt;  &lt;p&gt;This is where the gotchas are. The Startup Parameter property box is very sensitive.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;If you put your new parameter at the end of the list you must precede your new option with a semi-colon &lt;/li&gt;    &lt;li&gt;If you put your parameter at the beginning of the list you must append the option with a semi-colon (&lt;a href="http://msdn.microsoft.com/en-us/library/ms345416.aspx" target="_blank"&gt;documented&lt;/a&gt; but not clearly)&lt;/li&gt;    &lt;li&gt;You must NOT have any spaces between the semi-colon and the hyphen. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The last one is the real killer&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;If you put a space between the semi-colon and the hyphen then the parameter will be ignored.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This works:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image12_74A8B041.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image12_thumb_21BD9D10.png" width="660" height="494" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This does not:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image15_1089BF6D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image15_thumb_569A7C80.png" width="659" height="489" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;SQL Server interprets the startup parameter as “space-E” not “–E”.&lt;strong&gt; It will therefore not have the desired effect.&lt;/strong&gt;&lt;/p&gt;  &lt;h1&gt;&lt;/h1&gt;  &lt;h2&gt;The SQL Server Log&lt;/h2&gt;  &lt;p&gt;To compound the matter the SQL Log shows something quite interesting.&lt;/p&gt;  &lt;h3&gt;With ;-E&lt;/h3&gt;  &lt;p&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Mar 29 2009 10:11:52     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Copyright (c) 1988-2008 Microsoft Corporation     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Developer Edition (64-bit) on Windows NT 6.1 &amp;lt;X64&amp;gt; (Build 7600: ) &lt;/p&gt;  &lt;p&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (c) 2005 Microsoft Corporation.    &lt;br /&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; All rights reserved.     &lt;br /&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Server process ID is 1456.     &lt;br /&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System Manufacturer: 'Dell Inc.', System Model: 'Latitude D830'.     &lt;br /&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Authentication mode is MIXED.     &lt;br /&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'.     &lt;br /&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; This instance of SQL Server last reported using a process ID of 5876 at 20/04/2010 09:27:30 (local) 20/04/2010 08:27:30 (UTC). This is an informational message only; no user action is required.     &lt;br /&gt;2010-04-20 09:27:36.91 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Registry startup parameters:     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -d C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -e C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -l C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -E     &lt;br /&gt;2010-04-20 09:27:36.92 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.&lt;/p&gt;  &lt;h4&gt;Illustration of ;-E&lt;/h4&gt;  &lt;p&gt;I will use the great &lt;a href="http://internalsviewer.codeplex.com" target="_blank"&gt;Internals Viewer&lt;/a&gt; to demonstrate the impact of setting this parameter.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_0C4FC1DB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_51881904.png" width="680" height="365" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the graphic above the blueish boxes represent data pages that have been allocated from three extents. It can be clearly seen that all extents have been allocated from a single file.&lt;/p&gt;  &lt;p&gt;Without going into the details here (please see my next post to get the juice on –E) the default behaviour of SQL Server has changed. &lt;a href="http://msdn.microsoft.com/en-us/library/ms187501.aspx" target="_blank"&gt;Proportional fill&lt;/a&gt; has not occurred.&lt;/p&gt;  &lt;h3&gt;With ;space-E&lt;/h3&gt;  &lt;p&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Mar 29 2009 10:11:52     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Copyright (c) 1988-2008 Microsoft Corporation     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Developer Edition (64-bit) on Windows NT 6.1 &amp;lt;X64&amp;gt; (Build 7600: ) &lt;/p&gt;  &lt;p&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (c) 2005 Microsoft Corporation.    &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; All rights reserved.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Server process ID is 1604.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System Manufacturer: 'Dell Inc.', System Model: 'Latitude D830'.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Authentication mode is MIXED.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; This instance of SQL Server last reported using a process ID of 1456 at 20/04/2010 09:47:13 (local) 20/04/2010 08:47:13 (UTC). This is an informational message only; no user action is required.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Registry startup parameters:     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -d C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -e C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -l C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -E     &lt;br /&gt;2010-04-20 09:47:19.87 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.&lt;/p&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h4&gt;Illustration of ;space-E&lt;/h4&gt;  &lt;p&gt;As you can see from the graphic below the purple boxes representing data pages are now spread in three different data files. Three extents have again been allocated and the proportional fill algorithm has spread this allocation evenly across the files. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_16543D39.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_thumb_0D8434ED.png" width="676" height="358" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;So what does the SQL Server log show?&lt;/h3&gt;  &lt;p&gt;What’s the difference in the log? Almost nothing!&amp;#160; One could be very easily led to think that the –E startup parameter had been set as it shows in both logs. You have to look pretty closely to see that the second log –E is mis-aligned.&amp;#160; &lt;/p&gt;  &lt;p&gt;However, the actual difference in behaviour is significant. &lt;/p&gt;  &lt;p&gt;In the first instance SQL Server behaviour has been altered. In the second the change has no impact on SQL Server.&amp;#160; However, by looking at the log one could be led to believe that –E had in fact been set. Confusing? I think so.&lt;/p&gt;  &lt;h2&gt;SQL Server Log Conclusions&lt;/h2&gt;  &lt;p&gt;Discovering this issue has led me to an interesting conclusion.&lt;/p&gt;  &lt;p&gt;The SQL Server Log is a statement of intent not a statement of fact.&lt;/p&gt;  &lt;p&gt;I was expecting the log to tell me to tell me that –E had not been enabled when I had configured ;space-E. It did not. It tells me that SQL Server was started with space-E.&lt;/p&gt;  &lt;p&gt;The log is therefore spitting out the configured values not the running values (the ones that actually have an effect).&lt;/p&gt;  &lt;p&gt;What would be better is if the Log told me three things.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;What options were configured as Startup parameters &lt;/li&gt;    &lt;li&gt;What options had been set – i.e. the Runtime values &lt;/li&gt;    &lt;li&gt;What options weren’t recognised and therefore had been ignored &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I think it’d be much more helpful (and a lot less confusing) if SQL Server did something like this:&lt;/p&gt;  &lt;p&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System Manufacturer: 'Dell Inc.', System Model: 'Latitude D830'.    &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Authentication mode is MIXED.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; This instance of SQL Server last reported using a process ID of 1456 at 20/04/2010 09:47:13 (local) 20/04/2010 08:47:13 (UTC). This is an informational message only; no user action is required.     &lt;br /&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Configured registry startup parameters:     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -d C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -e C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -l C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -E&lt;/p&gt;  &lt;p&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Running registry startup parameters:    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -d C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -e C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -l C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;2010-04-20 09:47:19.86 Server&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Unrecognised Registry startup parameters:    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -E     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;It would be even nicer if the log actually explained what these options are. It could even provide a link to the BOL documentation. That’d be useful.&lt;/p&gt;  &lt;p&gt;Do you agree?&amp;#160; I have posted a connect item up. If you think this is worth changing in SQL Server then please vote!&lt;/p&gt;  &lt;p&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/553439/sql-server-log-and-startup-parameter-logging"&gt;https://connect.microsoft.com/SQLServer/feedback/details/553439/sql-server-log-and-startup-parameter-logging&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You may have noticed that I haven’t really explained in full what the –E parameter is. That is because I want to cover that in my next post and kick of my series entitled &amp;quot;&lt;a href="http://consultingblogs.emc.com/tags/Fast+Track+Data+Warehousing/default.aspx" target="_blank"&gt;Focus On Fast Track&lt;/a&gt;&amp;quot;.&amp;#160; It’s nearly done so don’t worry you won’t have to wait long!&lt;/p&gt;  &lt;p&gt;Until the next time, James&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=17134" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Database+Administration/default.aspx">Database Administration</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+Internals/default.aspx">SQL Server Internals</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Fast+Track+Data+Warehousing/default.aspx">Fast Track Data Warehousing</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Startup+Parameters/default.aspx">Startup Parameters</category></item><item><title>Last Call for SQLSocial London Event 16th March 2010 : Meet Itzik Ben-Gan, Greg Low, Davide Mauri &amp; Bill Vaughn</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2010/03/14/last-call-for-sqlsocial-london-event-16th-march-2010-meet-itzik-ben-gan-greg-low-davide-mauri-amp-bill-vaughn.aspx</link><pubDate>Sun, 14 Mar 2010 12:54:36 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16931</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16931.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16931</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16931</wfw:comment><description>&lt;p&gt;&lt;a href="http://sqlblogcasts.com/blogs/simons/Default.aspx" target="_blank"&gt;Simon Sabin&lt;/a&gt; has organised a SQLSocial event for this coming Tuesday. It’s at the &lt;a href="http://www.smithfieldtavern.co.uk" target="_blank"&gt;Smithfield Tavern&lt;/a&gt; and will start at 18:30.&lt;/p&gt;  &lt;p&gt;It features some of the worlds most famous SQL Server celebrities in an informal setting. These guys are over in the UK for &lt;a href="http://www.devweek.com" target="_blank"&gt;DevWeek&lt;/a&gt; and have kindly given up an evening to meet you all.&lt;/p&gt;  &lt;p&gt;85 people have already registered – so this is very much the last call for any stragglers who have yet to make up their minds.&lt;/p&gt;  &lt;p&gt;There aren’t many times you get the opportunity to just walk up to the likes of Bill, Greg or Itzik and ask them a question so I’d urge you to take advantage. You might even want to ask Davide about his plans for &lt;a href="http://www.codeplex.com/DTLoggedExec" target="_blank"&gt;DTLoggedExec&lt;/a&gt; – his free SSIS logging tool that’s available now on codeplex. Failing that you can always ask &lt;a href="http://sqlblogcasts.com/blogs/simons/Default.aspx" target="_blank"&gt;Simon&lt;/a&gt; about what’s going to happen at &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; VI. &lt;/p&gt;  &lt;p&gt;The event is free and your first beer is also free so there really is no reason to miss this.&lt;/p&gt;  &lt;p&gt;Head to &lt;a href="http://www.sqlsocial.com/Events/10-02-16/Evening_with_Itzik_Ben-Gan_Greg_Low_and_Davide_Mauri.aspx"&gt;http://www.sqlsocial.com/Events/10-02-16/Evening_with_Itzik_Ben-Gan_Greg_Low_and_Davide_Mauri.aspx&lt;/a&gt; for registration.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Agenda&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;6:30 Welcome, network, eat, post your question topic      &lt;br /&gt;7:00 Small session on something interesting       &lt;br /&gt;7:15 Q&amp;amp;A panel with Itzik, Greg, Davide and Bill       &lt;br /&gt;8:30 just socialise&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Smithfield Tavern      &lt;br /&gt;105 Charterhouse Street       &lt;br /&gt;London       &lt;br /&gt;EC1M 6HR&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Unfortunately I won’t be able to be there as I am working out in the Dam at the moment. However, I hope you all have fun.&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;P.S. If your mind goes blank ask about enhancements to the OVER clause… Almost guaranteed to generate a comment from a certain someone :o).&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16931" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>PASS Nederland Chapter Meeting 17/11/2009</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/11/18/pass-nederland-chapter-meeting-17-11-2009.aspx</link><pubDate>Wed, 18 Nov 2009 07:38:56 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16591</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16591.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16591</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16591</wfw:comment><description>&lt;p&gt;For those of you who aren’t aware I am currently working out of the Netherlands. That’s one of the joys of being&amp;#160; a consultant for a global organisation – you can literally end up anywhere! However, last night I had the please of speaking to the PASS Chapter here in the Netherlands &lt;a title="http://www.sqlpass.nl/" href="http://www.sqlpass.nl/"&gt;http://www.sqlpass.nl/&lt;/a&gt;. I covered some of the Data Warehousing Features in SQL Server 2008. It was a lot of fun and great to speak to a completely new audience for me.&amp;#160; Some people may have become wary of my presentation “style” after seeing me at &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; but here I had 30 or so willing victims who had no knowledge of me or my pop quizzes :o).&amp;#160; If you are in the UK and would like to know more about these features I will presenting this session on Friday 20th November at the SQLBits 2008 &amp;amp; R2 day.&amp;#160; It’s the last session of the day but what else are you going to do? Sit in traffic on the M4? Surely it’ll be less painful than that :o)…&lt;/p&gt;  &lt;p&gt;I’d like to thank every one who came along and look forward to attending next months session. If I wasn’t greatly mistaken (my Dutch is still a bit basic to say the least) Marcel van der Holst will be presenting.&amp;#160; Personally, I’d come over from the UK for that kind of session. Marcel is THE MAN and has helped me out with my book and also in understanding &lt;a href="http://blogs.conchango.com/jamesrowlandjones/archive/2009/05/28/the-curious-case-of-the-dubious-deadlock-and-the-not-so-logical-lock.aspx" target="_blank"&gt;the curious case of the dubious deadlock and the not so logical lock&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;A couple of things came up last night that people have asked me to post links to that I included in my presentation.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The excellent Data Loading Performance Guide - &lt;a title="http://msdn.microsoft.com/en-us/library/dd425070.aspx" href="http://msdn.microsoft.com/en-us/library/dd425070.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd425070.aspx&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Stuart Ozer’s ManagePartition.exe&amp;#160; - &lt;a title="http://sqlpartitionmgmt.codeplex.com/" href="http://sqlpartitionmgmt.codeplex.com/"&gt;http://sqlpartitionmgmt.codeplex.com/&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I will post the slides and the presentation up onto the SQLBits website once I’ve presented it this week...&lt;/p&gt;  &lt;p&gt;Big thanks to &lt;a href="http://andrekamman.com/" target="_blank"&gt;André Kamman&lt;/a&gt; (&lt;em&gt;not&lt;/em&gt; just another SQL DBA) for the invite and to &lt;a href="http://www.computrain.nl/Default.aspx?AspxAutoDetectCookieSupport=1" target="_blank"&gt;Compu’Train&lt;/a&gt; for hosting the event.&lt;/p&gt;  &lt;p&gt;See you all at &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt;! I think &lt;a href="http://blogs.technet.com/andrew/" target="_blank"&gt;Andrew Fryer&lt;/a&gt; still has a few tickets left so if you want to get to SQLBits on the Friday for FREE then send him a mail. &lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jrowlandjones" target="_blank"&gt;@jrowlandjones&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;P.S. Are you interested in becoming a BI consultant for EMC Consulting? If the answer is YES then please feel free to &lt;a href="http://consultingblogs.emc.com/jamesrowlandjones/contact.aspx" target="_blank"&gt;Contact Me&lt;/a&gt; and let’s start that discussion…&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16591" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/BI/default.aspx">BI</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQLBITS/default.aspx">SQLBITS</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Data+Warehousing/default.aspx">Data Warehousing</category></item><item><title>SQLBits V : Friday Ticket Give-away!</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/11/16/sqlbits-v-friday-ticket-give-away.aspx</link><pubDate>Mon, 16 Nov 2009 16:43:45 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16584</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>2</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16584.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16584</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16584</wfw:comment><description>&lt;p&gt;&lt;a href="http://blogs.technet.com/andrew/" target="_blank"&gt;Andrew Fryer&lt;/a&gt;, &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/default.aspx" target="_blank"&gt;Microsoft&lt;/a&gt; IT Pro evangelist extraordinaire, has &lt;strong&gt;25&lt;/strong&gt; free tickets to give away for this Friday’s &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; SQL Server 2008 and R2 day!&amp;#160; Head over to his blog &lt;a href="http://blogs.technet.com/andrew/archive/2009/11/16/sql-bits-friday-session.aspx" target="_blank"&gt;here&lt;/a&gt; to find out how you can claim a ticket and bag yourself a great geeky day out. You are also most welcome to stay over and enjoy the community day on the Saturday although you will need to foot the bill for your own accommodation. There are limits you know :o).&lt;/p&gt;  &lt;p&gt;Look forward to seeing you all there!&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jrowlandjones" target="_blank"&gt;@jrowlandjones&lt;/a&gt;&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16584" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008+R2/default.aspx">SQL Server 2008 R2</category></item><item><title>My new SQL 2008 Internals Book!!!</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/11/13/my-new-sql-2008-internals-book.aspx</link><pubDate>Fri, 13 Nov 2009 11:15:10 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16569</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>11</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16569.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16569</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16569</wfw:comment><description>&lt;p&gt;I say my but really of course I mean “our” :o).&amp;#160; It’s been a fantastic experience and I have got to know some great people and had a lot of fun, stress heartache and now joy.&amp;#160; Big thanks to the team at Wrox, especially Ami and of course my fellow authors and contributors, &lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/default.aspx" target="_blank"&gt;Jonathan Kehayias&lt;/a&gt; and Cindy Gross.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.co.uk/Professional-Server-2008-Internals-Troubleshooting/dp/0470484284/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1258110866&amp;amp;sr=8-1" target="_blank"&gt;&lt;img title="cover" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="720" alt="cover" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/cover_61C4D315.jpg" width="642" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Not much more to say than it’ll be available in all good bookshops in January but don’t let that stop you getting your pre-orders in now :).&lt;/p&gt;  &lt;p&gt;So in the style of Murray Walker “Buy! Buy! Buy!”&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jrowlandjones" target="_blank"&gt;@jrowlandjones&lt;/a&gt;&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16569" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/New+SQL+Book/default.aspx">New SQL Book</category></item><item><title>Bob Muglia demonstrates 192 core SQL Server 2008 R2 – with record performance</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/11/03/bob-muglia-demonstrates-192-core-sql-server-2008-r2-with-record-performance.aspx</link><pubDate>Tue, 03 Nov 2009 17:15:16 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16496</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16496.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16496</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16496</wfw:comment><description>&lt;p&gt;Today is the beginning of PASS 2009.&amp;#160; I am currently sat in the key note and have just seen Bob Muglia demonstrate a SQL Server 2008 R2 running 192 cores.&lt;/p&gt;  &lt;p&gt;I think that’s worth sharing. As I am sat next to &lt;a href="http://sqlblogcasts.com/blogs/simons/Default.aspx" target="_blank"&gt;Simon Sabin&lt;/a&gt; I thought I’d share this using pictures rather than bang on for pages of text (he hates it when I do that ).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/IMG_0547_05B1501F.jpg"&gt;&lt;img title="IMG_0547" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="237" alt="IMG_0547" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/IMG_0547_thumb_1C7FFBCE.jpg" width="319" border="0" /&gt;&lt;/a&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/IMG_0549_077E538E.jpg"&gt;&lt;img title="IMG_0549" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="237" alt="IMG_0549" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/IMG_0549_thumb_38BD1821.jpg" width="317" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;However, if you want to see what can be done with a mere 96 cores why not check out Henk van der Valk’s awesome work on YouTube &lt;a href="http://www.youtube.com/watch?v=2qjrq8kpZUs" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; If you want to meet Henk and see 96 cores in action at &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; 2009. Henk works in the European Performance Center for Unisys.&lt;/p&gt;  &lt;p&gt;Finally some new benchmarks announced today…&lt;/p&gt;  &lt;p&gt;Check out the new SQL Server 2008 R2 record for TPC-E.&amp;#160; Of interest to me is that R2 is not only the fastest 2012.77&amp;#160; as opposed to 1,568.22 but also at lower cost Price/tpsE (958.23 USD compared with 1180.01 USD).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.tpc.org/tpce/results/tpce_perf_results.asp" target="_blank"&gt;&lt;img title="TPC-E" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="170" alt="TPC-E" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/TPCE_5727590A.png" width="680" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Also of interest on the benchmarking front is the new SQL 2008 TPC-H benchmark.&amp;#160; TPC-H is a data warehousing benchmark. SQL Server 2008 R2 has featured rather well in the price/performance for 10,000 GB results. Yes that is SQL Server in the no.1 slot :o).&amp;#160; Whilst the QphH isn’t the same as some of the others it clearly demonstrates SQL Server scales way beyond common misconceptions.&amp;#160; It is also delivering scale at a much keener TCO.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.tpc.org/tpch/results/tpch_price_perf_results.asp" target="_blank"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="223" alt="image" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/image_2D63DE17.png" width="676" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I think that’s quite enough for now.&amp;#160; &lt;a href="http://sqlblogcasts.com/blogs/simons/Default.aspx" target="_blank"&gt;Simon&lt;/a&gt; is starting to hurt me (too many words).&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/IMG_0549_7CDD33D3.jpg"&gt;&amp;#160;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16496" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/PASS/default.aspx">PASS</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008+R2/default.aspx">SQL Server 2008 R2</category></item><item><title>Get Mugged at #SQLPASS 09</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/11/03/get-mugged-at-sqlpass-09.aspx</link><pubDate>Tue, 03 Nov 2009 08:05:26 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16486</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16486.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16486</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16486</wfw:comment><description>&lt;p&gt;Tomorrow I am hosting a table at the Birds of a Feather lunch and am following this up with my stint in the Ask The Experts Area (Data Warehousing). Please feel free to come by and say hi.&amp;#160; I know of two people now that have stumbled upon my blog so please don’t be shy. I rarely bite and the UK hasn’t had a case of rabies since November 2002. My aim is to get this up to double figures this week.&amp;#160; By way of inducement, I’ll have plenty of SQL bucks to give out and also should have a stack of &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; mugs to distribute too.&amp;#160; You won’t believe the effort we went to to get them at PASS this year.&amp;#160; I am still walking a little awkwardly… &lt;/p&gt;  &lt;p&gt;So if you fancy getting your hands on one these highly sought after collectors items then all you need to do is make sure you are &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;In Seattle&lt;/li&gt;    &lt;li&gt;Attending &lt;a href="http://twitter.com/sqlpass" target="_blank"&gt;#sqlpass&lt;/a&gt; 09&lt;/li&gt;    &lt;li&gt;At the Birds of a feather lunch or&lt;/li&gt;    &lt;li&gt;Lurking around the Ask the Experts area&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Please don’t be shy. I’d rather not be sat there like Billy no mates if it’s all the same to you.&amp;#160; Ok starting to sound a bit desperate so let’s have a look at what you could win…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://consultingblogs.emc.com/blogs/jamesrowlandjones/IMG_0546_6AAD85F5.jpg"&gt;&lt;img title="IMG_0546" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="361" alt="IMG_0546" src="http://consultingblogs.emc.com/blogs/jamesrowlandjones/IMG_0546_thumb_66DFBB58.jpg" width="480" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I should point out that not all the mugs made it on one piece and so those that survived are now extremely collectable.&amp;#160; Mugs will be offered on a first come first served basis – until I decide otherwise. One mug per mug/person. When they are gone they are gone. Caution contents of mug may be hot when filled with contents that are hot. Referee’s (my) decision is final. A SQLBits mug &lt;strong&gt;will&lt;/strong&gt; however make you more attractive to the opposite sex (after all you now own a collectors item).&amp;#160; Tests on improved levels of attractiveness to the same sex are on-going. Early tests are encouraging.&lt;/p&gt;  &lt;p&gt;I look forward to meeting you.&amp;#160; I have a lot of mugs.&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jrowlandjones" target="_blank"&gt;@jrowlandjones&lt;/a&gt;&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16486" width="1" height="1"&gt;</description></item><item><title>MVP 2.0</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/10/02/mvp-2-0.aspx</link><pubDate>Fri, 02 Oct 2009 13:52:16 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16312</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>4</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16312.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16312</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16312</wfw:comment><description>&lt;p&gt;Yesterday I was delighted to find in my junk mail (for some reason it’s always there) that I have been renewed as an MVP for the first time.&amp;#160; I’ll confess to have been quite nervous about whether this was going to be forthcoming or not; ultimately it’s all in the lap of the gods.&amp;#160; Thankfully they favoured me and so it’s game on for another year.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/jamesrowlandjones/archive/2008/10/07/and-then-there-were-three-sql-mvps-conchango.aspx" target="_blank"&gt;Last year&lt;/a&gt; my project pals (one in particular) surpassed themselves with a beautifully photoshopped picture of me whilst &lt;a href="http://consultingblogs.emc.com/rorystreet" target="_blank"&gt;others&lt;/a&gt; littered my desk with more “MVP” post-it notes than I care to remember.&amp;#160; This year I rather suspect the injury to my pride will be completely self-inflicted.&amp;#160; My MVP Lead recorded a video with me at the recent and very successful SQL Data Management Conference (#sqldmc for tweeps) on my MVP program experience. I rather suspect this will appear on &lt;a href="http://www.facebook.com/group.php?gid=6125540883" target="_blank"&gt;Facebook&lt;/a&gt; very shortly.&amp;#160; The MVP program has really embraced social media in recent times and can also be found on &lt;a href="http://twitter.com/mvpawardprogram" target="_blank"&gt;twitter&lt;/a&gt; (#mvp). I expect it’ll come across as rather gushing and so I will probably be watching it from behind a cushion cringing ever such a lot when its published.&amp;#160; &lt;/p&gt;  &lt;p&gt;That of course is to take nothing away from the MVP program which has been very good to me in the last year.&amp;#160; The community spirit amongst fellow MVPs, especially in the SQL newsgroup, is just amazing.&amp;#160; I just can’t stand to see myself “on telly” nor listen to my voice. It is at these times I realise what everyone else has to listen to when I am talking. I pity you all.&lt;/p&gt;  &lt;p&gt;I’d like to thank fellow UK MVPs and &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; committee members &lt;a href="http://sqlblogcasts.com/blogs/simons/Default.aspx" target="_blank"&gt;&lt;/a&gt;&lt;a href="http://sqlblogcasts.com/blogs/simons/Default.aspx" target="_blank"&gt;Simon Sabin&lt;/a&gt;,&lt;/a&gt; &lt;a href="http://cwebbbi.spaces.live.com/default.aspx" target="_blank"&gt;Chris Webb&lt;/a&gt;, &lt;a href="http://www.konesans.com" target="_blank"&gt;Allan Mitchell&lt;/a&gt;, &lt;a href="http://www.sqlis.com" target="_blank"&gt;Darren Green&lt;/a&gt; and &lt;a href="http://sqlblogcasts.com/blogs/martinbell/" target="_blank"&gt;Martin Bell&lt;/a&gt; for their continued support. My MVP lead for 2008/2009, Vicki, has been amazing and I’d like to thank her for all her efforts and sterling work. I’d also like to make a special mention to &lt;a href="http://ww.coeo.com" target="_blank"&gt;Christian Bolton&lt;/a&gt; (another UK MVP) for the opportunity to write some chapters in his upcoming book “&lt;a href="http://www.amazon.co.uk/Professional-Server-2008-Internals-Troubleshooting/dp/0470484284/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1254489827&amp;amp;sr=8-1" target="_blank"&gt;Professional SQL Server 2008: Internals and Performance Tuning&lt;/a&gt;”&amp;#160; where I am collaborating with Justin Langford, &lt;a href="http://www.brentozar.com/" target="_blank"&gt;Brent Ozar&lt;/a&gt;, a new SQL MVP (congratulations Brent), Steven Wort and seasoned MVPs &lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/default.aspx" target="_blank"&gt;Jonathan Kehayias&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/cindygross/" target="_blank"&gt;Cindy Gross&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;It’s been a great year and I look forward to seeing all 4 of you who read my blog at &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; in November.&amp;#160; Roll on October 2010.&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jrowlandjones" target="_blank"&gt;@jrowlandjones&lt;/a&gt;&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16312" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category></item><item><title>SQLBits V Mugshot Competition meets the Lying Down Game</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/08/27/sqlbits-v-mugshot-competition-meets-the-lying-down-game.aspx</link><pubDate>Thu, 27 Aug 2009 17:56:12 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16137</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>1</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16137.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16137</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16137</wfw:comment><description>&lt;p&gt;To help get everyone into the &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; spirit I’d like to remind everyone that we have started our own very cool competition – The Mugshot.&amp;#160; Those of you who went to SQLBits IV will have received a kickass SQLBits mug that we hoped you proudly use for ever more.&amp;#160; That very mug can now win you a free ticket and accommodation to the whole of SQLBits V!!!&amp;#160; All you need to do is take a picture of you with your mug some place interesting and post it up onto the site. If your photo is selected as the overall winner then prizes a plenty are yours!&lt;/p&gt;  &lt;p&gt;However, if you didn’t make it to SQLBits IV and therefore don’t have a genuine® SQLBits mug then have no fear.&amp;#160; You can create your own!&amp;#160; We have created the DIY mug. Print out the logo from &lt;a href="http://www.sqlbits.com/SQLBits%20Mug%20Shot%20Competition.pdf" target="_blank"&gt;here&lt;/a&gt; and affix it to your current substandard mug (I found one of my daughters hair-bands worked a treat) and off you go. &lt;/p&gt;  &lt;p&gt;To help give you some inspiration I have posted up a picture. However, there are no prizes for guessing which one is me. I think my sartorial elegance gives the game away far too easily for that.&amp;#160; As a committee member I have no chance of winning so please vote for other options.&lt;/p&gt;  &lt;p&gt;Best of luck! Check out the other offerings and post your efforts &lt;a href="http://www.sqlbits.com/Competition.aspx" target="_blank"&gt;here&lt;/a&gt;. Get creative - it could save you £££ (yes at least three pound signs).&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16137" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQLBITS/default.aspx">SQLBITS</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category></item><item><title>SQLBits V is open for Business – 19th – 21st November</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/08/26/sqlbits-v-is-open-for-business-19th-21st-november.aspx</link><pubDate>Wed, 26 Aug 2009 15:38:48 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:16125</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/16125.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=16125</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=16125</wfw:comment><description>&lt;p&gt;It's that time of year again!&amp;#160; &lt;a href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits&lt;/a&gt; registration is now open and this time it is going to be bigger and better than ever!&lt;/p&gt;  &lt;p&gt;For the first time SQLBits will be held during the week and at the week-end as we have grown the event to span three days.&lt;/p&gt;  &lt;p&gt;It’s also going to be held at the world famous Celtic Manor hotel – home to the 2010 Ryder Cup!&lt;/p&gt;  &lt;h3&gt;Day 1 – Training Day – Thursday 19th November&lt;/h3&gt;  &lt;p&gt;All day seminars from&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;&lt;a href="http://cwebbbi.spaces.live.com/default.aspx" target="_blank"&gt;Chris Webb&lt;/a&gt;&lt;/strong&gt; – Introduction to MDX &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.twitter.com/donalddotfarmer" target="_blank"&gt;Donald Farmer&lt;/a&gt;&lt;/strong&gt; (yes the Donald Farmer) – Self Service Business Intelligence – making it real &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.sqldbatips.com" target="_blank"&gt;Jasper Smith&lt;/a&gt; – &lt;/strong&gt;Practical Performance Tuning and Monitoring for SQL Server &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.twitter.com/nielsberglund" target="_blank"&gt;Niels Berglund&lt;/a&gt; - &lt;/strong&gt;A Day of SQL Server 2008 for Developers &lt;/li&gt;    &lt;li&gt;&lt;a href="http://sqlblogcasts.com/blogs/simons/Default.aspx" target="_blank"&gt;&lt;/a&gt;&lt;a href="http://sqlblogcasts.com/blogs/simons/Default.aspx" target="_blank"&gt;&lt;strong&gt;Simon Sabin&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; – &lt;/strong&gt;&lt;/a&gt;XML Master Class – Using XML with SQL Server &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Day 2 – SQL 2008 &amp;amp; R2 Day – Friday 20th November&lt;/h3&gt;  &lt;p&gt;This is a new day for us and is specifically targeting the 2008 version of SQL Server.&amp;#160; What it is, how you get there and what it will be in R2 are the themes for the day.&amp;#160; Donald will also be giving a key note presentation and we will also have Thomas Kejser from the SQLCAT team present. Thomas has written some great papers and his presentation at PASS 2008 on breaking the ETL world record was the highlight of the event for me. Definitely not one to be missed.&lt;/p&gt;  &lt;p&gt;The full agenda for this day hasn’t been concluded but expect topics from the list below to feature.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Business Intelligence:      &lt;ul&gt;       &lt;li&gt;Gemini and self-service BI &lt;/li&gt;        &lt;li&gt;New functionality in Reporting Services for SQL Server 2008&amp;#160; and R2 &lt;/li&gt;        &lt;li&gt;Master Data Services &lt;/li&gt;        &lt;li&gt;Project Madison &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;DBA      &lt;ul&gt;       &lt;li&gt;Multi-server management &lt;/li&gt;        &lt;li&gt;Data-tier application control &lt;/li&gt;        &lt;li&gt;Enhancements in the MDW &lt;/li&gt;        &lt;li&gt;Policy-based management &lt;/li&gt;        &lt;li&gt;Compression and Encryption &lt;/li&gt;        &lt;li&gt;Mirroring enhancements, Compressible log stream and page level repair &lt;/li&gt;        &lt;li&gt;Scalability – Going to 256 cores &lt;/li&gt;        &lt;li&gt;Handling large data sets with partitioning management and query improvements &lt;/li&gt;        &lt;li&gt;Improve large data operations with new bulk logged operations &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Developer      &lt;ul&gt;       &lt;li&gt;Enabling integration with 3rd party systems with Change Data Capture &lt;/li&gt;        &lt;li&gt;Managing replication to 100s of devices using Change tracking and Sync Services &lt;/li&gt;        &lt;li&gt;Spatial Data, Integrated Full text search and XML data &lt;/li&gt;        &lt;li&gt;New data types and programming improvements &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Day 3 – Community Day – Saturday 21st November&lt;/h3&gt;  &lt;p&gt;This is SQLBits “old skool”. If you have been to SQLBits before this will be very very familiar to you.&amp;#160; We are still accepting sessions for this. If you fancy submitting a session then please go right ahead. SQLBits is all about providing new opportunities to aspiring speakers and we are always on the look out for new talent.&amp;#160; However I won’t be able to promise any smug nipple rubbing at this talent show :o).&lt;/p&gt;  &lt;h3&gt;Interested?&lt;/h3&gt;  &lt;p&gt;Why not seize the moment and register yourself &lt;a href="http://www.regonline.com/builder/site/Default.aspx?eventid=741086" target="_blank"&gt;here&lt;/a&gt;. Spaces are capped and it is first come first served.&lt;/p&gt;  &lt;p&gt;If you have any questions about the event or if you think your company would be interested in sponsoring the event then please get in touch with me.&lt;/p&gt;  &lt;p&gt;Look forward to seeing you there!&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=16125" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQLBITS/default.aspx">SQLBITS</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>How To Tell: If connections to SQL Server are pooled (or not)</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/07/25/how-to-tell-if-connections-to-sql-server-are-pooled-or-not.aspx</link><pubDate>Sat, 25 Jul 2009 20:33:37 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:15913</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>3</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/15913.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=15913</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=15913</wfw:comment><description>&lt;p&gt;Have you ever wondered if the applications connecting to your SQL Servers are using pooled connections or not?&amp;#160; If the answer is yes then read on.&amp;#160; However, if the answer is no then you should! Opening and closing connections is an expensive process. When applications don’t use a connection pool then each request needs to establish its own connection before the query can be executed. It then has to close it. A pooled connection is one which is kept open by an application for other requests to re-use. &lt;/p&gt;  &lt;p&gt;The question therefore remains how do you actually find out if an application is using connection pooling or not?&amp;#160; Well SQL Trace can tell you.&amp;#160; If you execute the following statement you will see exactly which category/event and column you need to select to get at this information.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre id="codeSnippet" style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:101.11%;color:black;direction:ltr;border-top-style:none;line-height:12pt;padding-top:0px;font-family:'Courier New', courier, monospace;border-right-style:none;border-left-style:none;height:153px;background-color:#f4f4f4;text-align:left;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt;  cat.name            &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; category_name&lt;br /&gt;        ,evt.name           &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; event_name&lt;br /&gt;        ,col.name           &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; column_name&lt;br /&gt;        ,sub.subclass_name &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;    sys.trace_subclass_values sub&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt;    sys.trace_columns col           &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt;  sub.trace_column_id = col.trace_column_id&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt;    sys.trace_events evt            &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt;  sub.trace_event_id = evt.trace_event_id&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt;    sys.trace_categories cat        &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt;  cat.category_id = evt.category_id&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;WHERE&lt;/span&gt;   sub.subclass_name &lt;span style="color:#0000ff;"&gt;like&lt;/span&gt; &lt;span style="color:#006080;"&gt;'%pool%'&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;div&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/image_499102EF.png"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="241" alt="image" src="http://blogs.conchango.com/blogs/jamesrowlandjones/image_thumb_68D3A9C2.png" width="597" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;Clearly then we need to open up the Security Audit category and select the audit Login event.&amp;#160; To get at this information we must ensure to pick the EventSubClass column.&amp;#160; If we were using Profiler to build this trace it would look something like this&lt;/div&gt;

&lt;div&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/image_462F6B47.png"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="378" alt="image" src="http://blogs.conchango.com/blogs/jamesrowlandjones/image_thumb_43A63989.png" width="604" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;

&lt;div&gt;However, being a good tracer I’d actually want to set my trace up server side and drop the results to a file. To do this I’d export the definition I have just created using File | Export | Script Trace Definition | For SQL Server 2005 – 2008…&lt;/div&gt;

&lt;div&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/image_12574F29.png"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="283" alt="image" src="http://blogs.conchango.com/blogs/jamesrowlandjones/image_thumb_3E27A318.png" width="601" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;I’d then have a script that looked something like this:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:102.92%;color:black;direction:ltr;border-top-style:none;line-height:12pt;padding-top:0px;font-family:'Courier New', courier, monospace;border-right-style:none;border-left-style:none;height:1184px;background-color:#f4f4f4;text-align:left;border-bottom-style:none;"&gt;&lt;p&gt;&lt;span style="color:#008000;"&gt;/****************************************************/&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;/* Created by: SQL Server 2008 Profiler             */&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;/* Date: 25/07/2009  20:52:50         */&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;/****************************************************/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- Create a Queue&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;declare&lt;/span&gt; @rc &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;declare&lt;/span&gt; @TraceID &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;declare&lt;/span&gt; @maxfilesize bigint&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; @maxfilesize = 5 &lt;br /&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- Please replace the text InsertFileNameHere, with an appropriate&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- filename prefixed by a path, e.g., c:\MyFolder\MyTrace. The .trc extension&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- will be appended to the filename automatically. If you are writing from&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- remote server to local drive, please use UNC path and make sure server has&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- write access to your network share&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; @rc = sp_trace_create @TraceID &lt;span style="color:#0000ff;"&gt;output&lt;/span&gt;, 0, N&lt;span style="color:#006080;"&gt;'InsertFileNameHere'&lt;/span&gt;, @maxfilesize, &lt;span style="color:#0000ff;"&gt;NULL&lt;/span&gt; &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (@rc != 0) &lt;span style="color:#0000ff;"&gt;goto&lt;/span&gt; error&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- Client side File and Table cannot be scripted&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- Set the events&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;declare&lt;/span&gt; @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;bit&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt; = 1&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 7, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 23, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 8, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 64, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 9, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 21, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;  --EventSubClass&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 41, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 49, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 57, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 2, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 6, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 10, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 14, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 26, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 66, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 3, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 11, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 35, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 51, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 12, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 14, 60, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 7, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 23, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 31, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 8, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 64, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 9, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 21, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt; --EventSubClass&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 49, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 57, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 6, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 10, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 14, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 26, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 30, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 3, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 11, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 35, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 51, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 12, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setevent @TraceID, 20, 60, @&lt;span style="color:#0000ff;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- Set the Filters&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;declare&lt;/span&gt; @intfilter &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;declare&lt;/span&gt; @bigintfilter bigint&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt;&lt;br /&gt; sp_trace_setfilter @TraceID, 10, 0, 7, N&lt;span style="color:#006080;"&gt;'SQL Server Profiler - 180a71e3-2916-4eb5-b5cf-cb625d702f39'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- Set the trace status to start&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_trace_setstatus @TraceID, 1&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;-- display trace id for future references&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;select&lt;/span&gt; TraceID=@TraceID&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;goto&lt;/span&gt; finish&lt;br /&gt;&lt;br /&gt;error: &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;select&lt;/span&gt; ErrorCode=@rc&lt;br /&gt;&lt;br /&gt;finish: &lt;br /&gt;go&lt;/p&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;Note you still have to make some changes to this definition Notably you might want to make the file roll over and you’ll definitely want to change the filename. However, to all intents and purposes you are now good to go and your trace file will generate you something like this:&lt;/div&gt;

&lt;div&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/image_609C31D3.png"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="465" alt="image" src="http://blogs.conchango.com/blogs/jamesrowlandjones/image_thumb_6E0244D9.png" width="646" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;Hopefully that’s given you enough of a taster to look into this yourself.&amp;#160; If you want to know more you might be unsurprised to know that I am writing the SQL Trace chapter for this new SQL Internals book I am working on.&amp;#160; I got quite excited the other day as it appeared on &lt;a href="http://www.amazon.co.uk/Professional-Server-2008-Internals-Troubleshooting/dp/0470484284/ref=sr_1_2?ie=UTF8&amp;amp;qid=1248552553&amp;amp;sr=8-2" target="_blank"&gt;www.amazon.co.uk&lt;/a&gt; for the first time.&amp;#160; My name isn’t up in lights just yet (I think they need to do another refresh from the publishers as I joined the project late) however it is very exciting.&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;Till the next time,&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;James &lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;
  &lt;br /&gt;&lt;/div&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=15913" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Database+Development/default.aspx">Database Development</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Performance+Tuning/default.aspx">Performance Tuning</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/New+SQL+Book/default.aspx">New SQL Book</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/How+It+Works/default.aspx">How It Works</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+Internals/default.aspx">SQL Server Internals</category></item><item><title>When Books Online Fails… Try the US Patent Office!</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/07/19/when-books-online-fails-try-the-us-patent-office.aspx</link><pubDate>Sun, 19 Jul 2009 17:30:10 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:15887</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/15887.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=15887</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=15887</wfw:comment><description>&lt;p&gt;As those of you who managed to get to the bottom of my recent deadlocking &lt;a href="http://blogs.conchango.com/jamesrowlandjones/archive/2009/05/28/the-curious-case-of-the-dubious-deadlock-and-the-not-so-logical-lock.aspx" target="_blank"&gt;post&lt;/a&gt; may have seen I am busy writing a book with &lt;a href="http://ww.coeo.com" target="_blank"&gt;Christian Bolton&lt;/a&gt;, &lt;a href="http://www.coeo.com" target="_blank"&gt;Justin Langford&lt;/a&gt;, &lt;a href="http://www.brentozar.com/" target="_blank"&gt;Brent Ozar&lt;/a&gt;, Steve Wort, Cindy Gross and &lt;a href="http://sqlblog.com/blogs/jonathan_kehayias/default.aspx" target="_blank"&gt;Jonathan Kehayias&lt;/a&gt;.&amp;#160; Right now I am working on the SQL Trace and Profiler chapter and am currently describing the catalog views available for SQL Trace. Most of these are reasonably straight forward but there were a couple of columns on sys.traces_columns that piqued my interest.&lt;/p&gt;  &lt;p&gt;I was looking at Books Online for some inspiration as I wasn’t sure what the is_repeatable and is_repeated_base columns meant.&amp;#160; You can view the article for yourself here &lt;a title="http://msdn.microsoft.com/en-us/library/ms180067.aspx" href="http://msdn.microsoft.com/en-us/library/ms180067.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms180067.aspx&lt;/a&gt;.&amp;#160; Unfortunately I didn’t really get an answer from BOL. The columns and their BOL descriptions can be found below.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="625" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;strong&gt;Column_name&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Data Type&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;is_repeatable&lt;/td&gt;        &lt;td&gt;bit&lt;/td&gt;        &lt;td&gt;Indicates whether the column can be referenced in the “repeated column” data&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;is_repeated_base&lt;/td&gt;        &lt;td&gt;bit&lt;/td&gt;        &lt;td&gt;Indicates whether this column is&amp;#160; used as a unique key for referencing repeated data&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;As I say, I didn’t find myself any closer to knowing what these columns indicated. I thought I’d have a look at the data to see what the columns had these bit values set to see if that shed any light on proceedings.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;SELECT  &lt;/span&gt;trace_column_id
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;name
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:magenta;"&gt;type_name
        &lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;max_size
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;is_filterable
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;is_repeatable
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;is_repeated_base 
&lt;span style="color:blue;"&gt;FROM    &lt;/span&gt;&lt;span style="color:green;"&gt;sys&lt;/span&gt;&lt;span style="color:gray;"&gt;.&lt;/span&gt;&lt;span style="color:green;"&gt;trace_columns
&lt;/span&gt;&lt;span style="color:blue;"&gt;WHERE   &lt;/span&gt;is_repeatable &lt;span style="color:gray;"&gt;= &lt;/span&gt;1
&lt;span style="color:gray;"&gt;OR      &lt;/span&gt;is_repeated_base &lt;span style="color:gray;"&gt;= &lt;/span&gt;1&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Returned&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/image_4592D088.png"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="234" alt="image" src="http://blogs.conchango.com/blogs/jamesrowlandjones/image_thumb_64D5775B.png" width="616" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Hmm nothing on the face of it.&amp;#160; Nothing that described what was meant by “repeated data”. Time to Bing! it. Ta Da! Whaddya know the answer lies at the US Patent Office. My search uncovered this article &lt;a title="http://www.patents.com/System-monitoring-performance-a-server/US7155641/en-US/" href="http://www.patents.com/System-monitoring-performance-a-server/US7155641/en-US/"&gt;http://www.patents.com/System-monitoring-performance-a-server/US7155641/en-US/&lt;/a&gt;. It’s the patent assignment to &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/default.aspx" target="_blank"&gt;Microsoft&lt;/a&gt; for SQL Trace. Actually, it’s a great read and I thoroughly recommend you download the pdf so you get to see the drawings in conjunction with the available text. However, for the purposes of “repeated data” the bits you want to read are these.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The &amp;quot;trace repeated data&amp;quot; column indicates a desired repetition of data from a preceding event. The &amp;quot;trace repeated data&amp;quot; column is preferably followed by a range of column identifiers in which to insert the repeated data. Such repetition is available only for columns specifically defined as repeatable columns.&lt;/p&gt;

  &lt;p&gt;…&lt;/p&gt;

  &lt;p&gt;Repeatable element 630 provides an indication of whether column 610 is repeatable. Server 220 desirably need not resend data corresponding to a repeatable column in a subsequent trace. If a repeatable column is selected to be repeated, then it is indicated in the &amp;quot;trace repeated data&amp;quot; trace special column set forth above.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So there we have it.&amp;#160; The metadata for repeatable columns has been exposed in the sys.traces_columns catalog view. It means that the columns marked as is_repeatable can derive their values from earlier events with the same SPID.&amp;#160; I can say this because SPID is the only column to have the is_repeated_base flag set to true. If we look at the columns that are marked as is_repeatable this all begins to make sense.&amp;#160; The data we’d expect to see in repeatable columns are static in nature and so it makes sense to try and optimise the trace by deriving this event info from a previous event rather than re-send this additional column data.&lt;/p&gt;

&lt;p&gt;What does this all mean? Well, to me it means that we should be able to add these columns to our trace without fear of it causing performance degradation. That’s a theory of course. However, now I am going to see how I can work this into my chapter….&lt;/p&gt;

&lt;p&gt;Cheers, James&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=15887" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Performance+Tuning/default.aspx">Performance Tuning</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Monitoring/default.aspx">Monitoring</category></item><item><title>Calculating the ROI of DRY SQL vs FLY SQL</title><link>http://consultingblogs.emc.com/jamesrowlandjones/archive/2009/07/15/calculating-the-roi-of-dry-sql-vs-fly-sql.aspx</link><pubDate>Wed, 15 Jul 2009 15:53:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:15860</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>2</slash:comments><comments>http://consultingblogs.emc.com/jamesrowlandjones/comments/15860.aspx</comments><wfw:commentRss>http://consultingblogs.emc.com/jamesrowlandjones/commentrss.aspx?PostID=15860</wfw:commentRss><wfw:comment>http://consultingblogs.emc.com/jamesrowlandjones/rsscomments.aspx?PostID=15860</wfw:comment><description>&lt;p&gt;My colleague &lt;a href="http://blogs.conchango.com/jamiethomson" target="_blank"&gt;&lt;/a&gt;&lt;a href="http://blogs.conchango.com/jamiethomson/" target="_blank"&gt;Jamie Thomson&lt;/a&gt;&amp;#160;&lt;/a&gt; posted an intriguing article on DRY SQL which you can read all about &lt;a href="http://blogs.conchango.com/jamiethomson/archive/2009/07/02/dry-sql.aspx" target="_blank"&gt;here&lt;/a&gt;. It raised a number of questions for me so I thought I’d post my own response to it.&lt;/p&gt;  &lt;p&gt;Here is a list of some of these questions that sprung to my mind.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Did the code change come up with the same query plan? &lt;/li&gt;    &lt;li&gt;Were the tables indexed in the same way? Do both have an index on asset class? Does it cover the query? (You’ll see why I ask below) &lt;/li&gt;    &lt;li&gt;Had the performance changed in anyway (for the better or worse)? &lt;/li&gt;    &lt;li&gt;Had the compilation time gone up or down? &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I hope you can get the general drift of my thoughts.&amp;#160; Ostensibly they could be boiled down to two things.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Was this really a re-write rather than a re-factoring? &lt;/li&gt;    &lt;li&gt;Was it worth it? &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.conchango.com/jamiethomson" target="_blank"&gt;Jamie&lt;/a&gt;’s illustration was an example based on some work he was doing for a client. Therefore he wasn’t really in a position to really answer all of these questions. I therefore came up with my own AdventureWorks based example which I’d like to take you through.&lt;/p&gt;  &lt;p&gt;Before starting to cut any code I thought I’d set up my own hypothesis by answering the my own questions&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Yes I am now performing one sort and one aggregation instead of two of each. &lt;/li&gt;    &lt;li&gt;Have no idea – possibly both were indexed on asset class but maybe not covered &lt;/li&gt;    &lt;li&gt;Depends. Two separate sorts for the group by might be better than a single sort of one big dataset. On the other hand one operation for smaller volumes might be better. &lt;/li&gt;    &lt;li&gt;Might have gone down (SQL more easily to shred/understand to come up with the good enough plan) &lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;Scenario&lt;/h2&gt;  &lt;p&gt;This is the code I used to create the scenario.&amp;#160; Before each run I cleaned out the cache and buffers and issued a check point for any dirty pages.&lt;span style="color:green;"&gt;&lt;/span&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;USE &lt;/span&gt;AdventureWorks&lt;span style="color:gray;"&gt;;

&lt;/span&gt;&lt;span style="color:blue;"&gt;SET STATISTICS TIME ON&lt;/span&gt;&lt;span style="color:gray;"&gt;;
&lt;/span&gt;&lt;span style="color:blue;"&gt;DBCC &lt;/span&gt;FREEPROCCACHE&lt;span style="color:gray;"&gt;;
&lt;/span&gt;&lt;span style="color:blue;"&gt;DBCC &lt;/span&gt;DROPCLEANBUFFERS&lt;span style="color:gray;"&gt;;
&lt;/span&gt;&lt;span style="color:blue;"&gt;CHECKPOINT&lt;/span&gt;&lt;span style="color:gray;"&gt;;

&lt;/span&gt;&lt;span style="color:green;"&gt;/* WET SQL */
&lt;/span&gt;&lt;span style="color:blue;"&gt;SELECT   &lt;/span&gt;LastName
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;FirstName
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:magenta;"&gt;SUM&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;ContactID&lt;span style="color:gray;"&gt;)
&lt;/span&gt;&lt;span style="color:blue;"&gt;FROM    &lt;/span&gt;Person&lt;span style="color:gray;"&gt;.&lt;/span&gt;Contact
&lt;span style="color:blue;"&gt;WHERE   &lt;/span&gt;LastName &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;'Zhou'
&lt;/span&gt;&lt;span style="color:blue;"&gt;GROUP BY &lt;/span&gt;LastName
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;FirstName
&lt;span style="color:blue;"&gt;UNION &lt;/span&gt;&lt;span style="color:gray;"&gt;ALL 
&lt;/span&gt;&lt;span style="color:blue;"&gt;SELECT   &lt;/span&gt;LastName
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;FirstName
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:magenta;"&gt;SUM&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;ContactID&lt;span style="color:gray;"&gt;)
&lt;/span&gt;&lt;span style="color:blue;"&gt;FROM    &lt;/span&gt;Person&lt;span style="color:gray;"&gt;.&lt;/span&gt;Contact
&lt;span style="color:blue;"&gt;WHERE   &lt;/span&gt;LastName &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;'Edwards'
&lt;/span&gt;&lt;span style="color:blue;"&gt;GROUP BY &lt;/span&gt;LastName
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;FirstName&lt;span style="color:gray;"&gt;;

&lt;/span&gt;&lt;span style="color:blue;"&gt;DBCC &lt;/span&gt;FREEPROCCACHE &lt;span style="color:gray;"&gt;;
&lt;/span&gt;&lt;span style="color:blue;"&gt;DBCC &lt;/span&gt;DROPCLEANBUFFERS&lt;span style="color:gray;"&gt;;
&lt;/span&gt;&lt;span style="color:blue;"&gt;CHECKPOINT&lt;/span&gt;&lt;span style="color:gray;"&gt;;

&lt;/span&gt;&lt;span style="color:green;"&gt;/* DRY SQL */
&lt;/span&gt;&lt;span style="color:blue;"&gt;SELECT   &lt;/span&gt;LastName
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;Firstname
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:magenta;"&gt;SUM&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;ContactID&lt;span style="color:gray;"&gt;)
&lt;/span&gt;&lt;span style="color:blue;"&gt;FROM
&lt;/span&gt;&lt;span style="color:gray;"&gt;(   &lt;/span&gt;&lt;span style="color:blue;"&gt;SELECT   &lt;/span&gt;LastName
            &lt;span style="color:gray;"&gt;,&lt;/span&gt;FirstName
            &lt;span style="color:gray;"&gt;,&lt;/span&gt;ContactID
    &lt;span style="color:blue;"&gt;FROM    &lt;/span&gt;Person&lt;span style="color:gray;"&gt;.&lt;/span&gt;Contact
    &lt;span style="color:blue;"&gt;WHERE   &lt;/span&gt;LastName &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;'Zhou'
    &lt;/span&gt;&lt;span style="color:blue;"&gt;UNION &lt;/span&gt;&lt;span style="color:gray;"&gt;ALL
    &lt;/span&gt;&lt;span style="color:blue;"&gt;SELECT   &lt;/span&gt;LastName
            &lt;span style="color:gray;"&gt;,&lt;/span&gt;FirstName
            &lt;span style="color:gray;"&gt;,&lt;/span&gt;ContactID
    &lt;span style="color:blue;"&gt;FROM    &lt;/span&gt;Person&lt;span style="color:gray;"&gt;.&lt;/span&gt;Contact
    &lt;span style="color:blue;"&gt;WHERE   &lt;/span&gt;LastName &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;'Edwards'
&lt;/span&gt;&lt;span style="color:gray;"&gt;) &lt;/span&gt;a
&lt;span style="color:blue;"&gt;GROUP BY &lt;/span&gt;LastName
        &lt;span style="color:gray;"&gt;,&lt;/span&gt;FirstName&lt;span style="color:gray;"&gt;;

&lt;/span&gt;&lt;span style="color:green;"&gt;/*

CREATE NONCLUSTERED INDEX JRJ_NNCI_Contact_01 &lt;/span&gt;&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color:green;"&gt;ON Person.Contact(LastName);
&lt;/span&gt;&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color:green;"&gt;CREATE NONCLUSTERED INDEX JRJ_NNCI_Contact_02 &lt;/span&gt;&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color:green;"&gt;ON Person.Contact(LastName,FirstName);

DROP INDEX Person.Contact.JRJ_NNCI_Contact_01;
DROP INDEX Person.Contact.JRJ_NNCI_Contact_02;

*/
&lt;/span&gt;&lt;/pre&gt;

&lt;h2&gt;Run 1&lt;/h2&gt;

&lt;p&gt;Let’s just run that sql as is to answer a fundamental question.&amp;#160; Is this a refactoring or is this a material change and therefore a re-write?&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/clip_image002_127F724F.jpg"&gt;&lt;img title="clip_image002" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="376" alt="clip_image002" src="http://blogs.conchango.com/blogs/jamesrowlandjones/clip_image002_thumb_09AF6A03.jpg" width="606" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To me straight away two things are very obvious.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The plans are different &lt;/li&gt;

  &lt;li&gt;The costs are nigh on identical &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why are the plans different? Well because in the first instance (WET SQL) we asked them to be. We asked sql server to do the group by and then bring the results together.&amp;#160; Now you might see something like this on a distributed platform where the contact table was distributed. An example might be on Madison when it comes out. Processing the Group BY locally would work MUCH better than pulling all the data together and then issuing the group by.&lt;/p&gt;

&lt;p&gt;So is this refactoring? That depends on your definition of the word. If your definition is based on whether the inputs and the output are the same only the guts have changed then yes this is a re-factoring. However, if your definition of re-factoring is whether you are making the same request but formatted differently for maintainability then no this is a re-write. Fundamentally this is a different request. The SQL might now be DRY and it does return the same data based on the same inputs but it is achieving this in a very different way.&amp;#160; Whether 1 is better than 2 will depend on data volumes amongst other things.&lt;/p&gt;

&lt;p&gt;Irrespective of the change however, the performance is pretty much bang on the same.&amp;#160; At this level the ROI of making the SQL DRY doesn’t look like it’s paying off.&amp;#160; So rather than looking at making the SQL DRY how about making the SQL FLY?&lt;/p&gt;

&lt;p&gt;As our baseline the subtree and compile costs of the WET SQL and the DRY SQL were as follows&lt;/p&gt;

&lt;table cellspacing="0" cellpadding="2" width="400" border="1"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&amp;#160;&lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;WET SQL&lt;/strong&gt; &lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;DRY SQL&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Sub tree cost&lt;/td&gt;

      &lt;td&gt;1.76&lt;/td&gt;

      &lt;td&gt;1.75&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Compile Time 
        &lt;br /&gt;(CPU/Elapsed) ms&lt;/td&gt;

      &lt;td&gt;16/63&lt;/td&gt;

      &lt;td&gt;7/7&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;As we saw the Sub tree costs are nigh-on identical but the compile time is reduced. Tick in the box for the hypothesis step 4.&lt;/p&gt;

&lt;p&gt;Let’s look at how investing in indexing might make more of a difference. &lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h2&gt;Run 2 - Index on Last Name only&lt;/h2&gt;

&lt;p&gt;Let’s add an index and see what happens&lt;/p&gt;

&lt;p&gt;&lt;span style="color:blue;"&gt;CREATE NONCLUSTERED INDEX &lt;/span&gt;JRJ_NNCI_Contact_01 &lt;span style="color:blue;"&gt;ON &lt;/span&gt;Person&lt;span style="color:gray;"&gt;.&lt;/span&gt;Contact&lt;span style="color:gray;"&gt;(&lt;/span&gt;LastName&lt;span style="color:gray;"&gt;);&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="color:gray;"&gt;&lt;font color="#000000"&gt;This index won’t cover the query but it will help it allowing SQL Server to cut into the data more effectively:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/clip_image0024_5441CDD5.jpg"&gt;&lt;img title="clip_image002[4]" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="533" alt="clip_image002[4]" src="http://blogs.conchango.com/blogs/jamesrowlandjones/clip_image0024_thumb_52FD34F6.jpg" width="598" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;The index above has been added to AdventureWorks and the plan above has clearly picked it up.&amp;#160; The difference between the two is now at least&amp;#160; noticeable (but not much) in favour of the DRY SQL now but we are doing a lookup of the first name. However, what has happened to the actual performance?&lt;/p&gt;

&lt;table cellspacing="0" cellpadding="2" width="401" border="1"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&amp;#160;&lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;WET SQL&lt;/strong&gt; &lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;DRY SQL&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Sub tree cost&lt;/td&gt;

      &lt;td&gt;0.503&lt;/td&gt;

      &lt;td&gt;0.492&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Compile Time 
        &lt;br /&gt;(CPU/Elapsed) ms&lt;/td&gt;

      &lt;td&gt;0/40&lt;/td&gt;

      &lt;td&gt;0/8&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;A significant drop in both sub tree costs and a drop in compile time for the WET SQL! However, we can take this further by covering the query.&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h2&gt;Run 3 – Covered Index&lt;/h2&gt;

&lt;p&gt;New index this time covering the query by including first name as well as last name.&lt;/p&gt;

&lt;p&gt;&lt;span style="color:blue;"&gt;CREATE NONCLUSTERED INDEX &lt;/span&gt;JRJ_NNCI_Contact_02 &lt;span style="color:blue;"&gt;ON &lt;/span&gt;Person&lt;span style="color:gray;"&gt;.&lt;/span&gt;Contact&lt;span style="color:gray;"&gt;(&lt;/span&gt;LastName&lt;span style="color:gray;"&gt;,&lt;/span&gt;FirstName&lt;span style="color:gray;"&gt;);&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/clip_image00210_3632840F.jpg"&gt;&lt;img title="clip_image002[10]" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="443" alt="clip_image002[10]" src="http://blogs.conchango.com/blogs/jamesrowlandjones/clip_image00210_thumb_7B6ADB38.jpg" width="597" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wow! Look at that SQL Server has now chosen the &lt;strong&gt;same plan&lt;/strong&gt; for both queries. By any definition of re-factoring the DRY SQL hasn’t altered the query.&amp;#160; The Covering Index has forced order on the data so the group by is no longer necessary.&amp;#160; All that is left is to aggregate the data.&lt;/p&gt;

&lt;p&gt;Notice DRY vs WET is not making a heap of difference to performance again with both Query costs weighing in at 50%. However, the lookups have been eliminated. Methinks a performance optimisation is in the offing….&lt;/p&gt;

&lt;table cellspacing="0" cellpadding="2" width="401" border="1"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&amp;#160;&lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;WET SQL&lt;/strong&gt; &lt;/td&gt;

      &lt;td&gt;&lt;strong&gt;DRY SQL&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Sub tree cost&lt;/td&gt;

      &lt;td&gt;0.0069&lt;/td&gt;

      &lt;td&gt;0.0069&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td&gt;Compile Time 
        &lt;br /&gt;(CPU/Elapsed) ms&lt;/td&gt;

      &lt;td&gt;14/62&lt;/td&gt;

      &lt;td&gt;16/68&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;There we have it a truly massive improvement in performance! 0.0069 vs an original baseline of ~1.76.&amp;#160; However, notice that the DRY SQL compile time has now shot up! I ran this query several times just to be sure and every time the compile time was over 60ms.&amp;#160; SQL Server was definitely taking longer to find this plan.&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;No one can under-estimate the importance of manageable, maintainable code in production. Pages of SQL obscured by layer upon layer of view definitions is horrendous to have to unpick when there is an issue.&amp;#160; However, investing time in making SQL DRY may not give you any real performance benefit.&amp;#160; In fact in so doing you might alter the way in which SQL Server, or any RDBMS for that matter, interprets your request.&amp;#160; This might give you a performance improvement but it might also have little or no impact whatsoever. Just remember that it could and it could also make things worse.&amp;#160; The ROI of attempting to make your SQL DRY will therefore heavily depend on how maintainable the code was in the first place.&lt;/p&gt;

&lt;p&gt;However, a little look at making your SQL FLY with a spot of index tuning might be just the ticket! The ROI in the examples above are pretty clear to me…&lt;/p&gt;

&lt;p&gt;Cheers, James&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=15860" width="1" height="1"&gt;</description><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Database+Development/default.aspx">Database Development</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/T-SQL/default.aspx">T-SQL</category><category domain="http://consultingblogs.emc.com/jamesrowlandjones/archive/tags/Performance+Tuning/default.aspx">Performance Tuning</category></item></channel></rss>