<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>SQLServerPedia</title>
	
	<link>http://sqlserverpedia.com/blog</link>
	<description />
	<lastBuildDate>Sat, 11 Jul 2009 21:18:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/sqlserverpedia" type="application/rss+xml" /><feedburner:emailServiceId>sqlserverpedia</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Bored this summer?</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/fwvLwidyuLs/</link>
		<comments>http://sqlserverpedia.com/blog/sql-server-bloggers/bored-this-summer/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 21:18:56 +0000</pubDate>
		<dc:creator>Michelle Ufford</dc:creator>
				<category><![CDATA[SQL Server Bloggers]]></category>

		<guid isPermaLink="false">http://sqlfool.com/?p=1089</guid>
		<description><![CDATA[Bored this summer?  Do you like to help others?  Do you have too much free time?  Do you find yourself thinking, &#8220;Man, I really should spend more time indoors.&#8221;  If you answered &#8220;yes&#8221; to all any of these questions, then have I got a proposition for you!

What could be more fun [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Bored this summer?  Do you like to help others?  Do you have too much free time?  Do you find yourself thinking, &#8220;Man, I really should spend more time indoors.&#8221;  If you answered &#8220;yes&#8221; to <span style="text-decoration: line-through;">all</span> any of these questions, then have I got a proposition for you!</p>
<p><em><a href="http://www.imdb.com/title/tt0205000/" ><div class="wp-caption aligncenter" style="width: 410px"><img title="Sorry, guys, not that kind of proposition" src="http://kurtatdisney.files.wordpress.com/2009/04/deuce_bigalow_male_gigolo_ver2.jpg" alt="Sorry, guys, not that kind of proposition" width="400" height="596" /><p class="wp-caption-text">Sorry, guys, not that kind of proposition</p></div></a></em></p>
<p>What could be more fun than getting second-degree burns at the waterpark, you ask?  Volunteering on the <a href="http://www.sqlpass.org/Community/SIGs/PerformanceSIG.aspx" >PASS Performance SIG</a>!  That&#8217;s right, we&#8217;re looking for a few good women and men to join our ranks as content contributors.  Specifically, we&#8217;re looking for people to write articles and/or host LiveMeeting events on performance-related topics.  Not a performance expert?  This can be a great way for you to learn more.</p>
<p>In case I scared you off in my opening paragraph, let me assure you that it really does not take that much time to be a volunteer.  Just 3-4 hours a month can be a huge help.  We&#8217;re also looking for contributors of all experience levels, so if you&#8217;re only comfortable writing intro-level articles, that&#8217;s definitely okay.</p>
<p>Oh, and while I&#8217;m begging for volunteers, <a href="http://sqlfool.com/2009/06/east-iowa-sql-saturday-call-for-speakers/" >we&#8217;re still looking for speakers</a> for the <a href="http://sqlsaturday.380pass.org/" >SQL Saturday in East Iowa</a>.  <img src='http://sqlfool.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you&#8217;re interested in either, then please send me an e-mail at michelle <em>at</em> sqlfool <em>dot</em> com for more information.</p>
<img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/fwvLwidyuLs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/sql-server-bloggers/bored-this-summer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/sql-server-bloggers/bored-this-summer/</feedburner:origLink></item>
		<item>
		<title>Vendor Wall of Shame Inductee</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/bR8-W4eEKxk/</link>
		<comments>http://sqlserverpedia.com/blog/professional-development/vendor-wall-of-shame-inductee/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 20:46:09 +0000</pubDate>
		<dc:creator>Tim Ford</dc:creator>
				<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQL Server Bloggers]]></category>

		<guid isPermaLink="false">http://www.ford-it.com/sqlagentman/?p=316</guid>
		<description><![CDATA[Let me preface this post by saying how much I love my job.  I don't want to lose my job and therefore I will be unable to name names.  However, from time to time I will be using this bully pulpit to shout to the 6 people that read this blog about actions, requirements, or statements made by vendors that I have to deal with on a consistent basis.]]></description>
			<content:encoded><![CDATA[<p>Let me preface this post by saying how much I love my job.  I don&#8217;t want to lose my job and therefore I will be unable to name names.  However, from time to time I will be using this bully pulpit to shout to the 6 people that read this blog about actions, requirements, or statements made by vendors that I have to deal with on a consistent basis.</p>
<p>They say a picture is worth a thousand words so with that in mind I give you this.</p>
<div id="attachment_317" class="wp-caption alignnone" style="width: 310px"><a href="http://www.ford-it.com/wordpress/wp-content/uploads/2009/07/bad_install_instructions_01.jpg"><img class="size-medium wp-image-317 " title="Poor Install Instructions" src="http://www.ford-it.com/wordpress/wp-content/uploads/2009/07/bad_install_instructions_01-300x66.jpg" alt="I didn't know Atari 800s had C drives." width="300" height="66" /></a><p class="wp-caption-text">Atari 800s have C drives?</p></div>
<p> </p>
<p>Okay, while the instructions do not go on to state that this product needs to be installed on an Atari 800, it does state numerous times that this is to be installed on MSDE.  (Remember that from all those years ago?)  The install scripts, when reviewed also create a login with a matching password (neither strong by any means), creates a database with a data file of 8Mb and corresponding log file of 23Mb (really, 23?  Did someone pull a number out of their &lt;REDACTED&gt;?  Anyone like to guess at what autogrowth is set at for these two files?  Additionally, db_datareader role rights are granted to the SQL user in the database, but yet the script goes on to explicitly grant SELECT rights to about 80% of the tables created.  Is there such a thing as half-&lt;REDACTED&gt; overkill?  Apparently there is.</p>
<p>I do commend this company for doing a few things right.  They do create indexes, constraints, and keys.  I can not tell you how well, but they do create them which is better than some installs I&#8217;ve been involved with in the past. </p>
<p><span style="text-decoration: line-through;">Being a somewhat-decent DBA what did I do to rectify the shortcomings?  What makes you think I did anything?  I connected as SA and ran the damn script.  Heck, if things aren&#8217;t right they&#8217;ll take care of themselves right?  DB too small?  It will autogrow 1Mb at a time.  With a login and password that are the same you only need to remember one simple word right?  Right.</span>  No, what I did was manually create the database after contacting the vendor to get a proper estimate of expected growth over the next three years based upon our expected usage.  I also created a role in the database, commented-out the grant of db_datareader rights, and granted explicit SELECT rights on the objects to the new role.  In the meantime I am waiting for the vendor to tell me if they support using Windows-based security or if I need to rely on a SQL Server login/password.  Either way I will assign the proper login role membership to the one I just created in the database.  Oh, and forget MSDE.  We&#8217;re running SQL Server in this shop baby!  Don&#8217;t try to tell me they&#8217;re the same thing.  Most-importantly I did not install the database files or transaction logs on the C: drive.</p>
<p>So, my first Vendor Wall of Shame Inductee is &lt;REDACTED&gt;.  I&#8217;ve seen their other products as well.  I sure hope they have a decent amount of space on their bookcase, because more awards are to come I&#8217;m sure.</p>
<img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/bR8-W4eEKxk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/professional-development/vendor-wall-of-shame-inductee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/professional-development/vendor-wall-of-shame-inductee/</feedburner:origLink></item>
		<item>
		<title>Why do I keep seeing this mistake?</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/8ubySAv5iu8/</link>
		<comments>http://sqlserverpedia.com/blog/transact-sql-t-sql/why-do-i-keep-seeing-this-mistake/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 19:50:42 +0000</pubDate>
		<dc:creator>KKline</dc:creator>
				<category><![CDATA[Transact-SQL (T-SQL)]]></category>

		<guid isPermaLink="false">http://sqlserverpedia.com/blog/?p=6492</guid>
		<description><![CDATA[One of the fundamentals of loop optimization is that you should move stable operations outside of the loop.  What I want to know is &#8211; if this is such a fundamental rule, why do so many people break it?!?
If you are familiar with other programming languages, then you are probably aware of loop optimization [...]]]></description>
			<content:encoded><![CDATA[<p>One of the fundamentals of loop optimization is that you should move stable operations outside of the loop.  What I want to know is &#8211; if this is such a fundamental rule, why do so many people break it?!?</p>
<p>If you are familiar with other programming languages, then you are probably aware of loop optimization techniques. You should try to put all operations outside of the loop if they don’t need to change within the loop. This reduces the amount of unnecessary repetitive work. SQL Server optimizer doesn’t automatically recognize such inefficiencies and clean the code for you (compilers of some other languages do). You have to write efficient loops yourself as in the following example.</p>
<p>These scripts print a table of square roots for all numbers from 1 to 100.  (My apologies but Wordpress won&#8217;t seem to keep my indents in place in the code.)  Notice the boldfaced code below:</p>
<p><pre class="brush:tsql">-- Loop with code inside = inefficient</pre></p>
<p><pre class="brush:tsql">SET NOCOUNT ON
DECLARE @message VARCHAR(25),  @counter SMALLINT
SELECT  @counter = 0
WHILE @counter &lt; 100
BEGIN
SET @counter = @counter + 1
SET @message = REPLICATE( '-', 25 )
PRINT  @message
SET @message = str( @counter, 10 ) + str( SQRT( CONVERT( FLOAT, @counter ) ), 10, 4 )
PRINT  @message
END</pre></p>
<p>&#8211; Elapsed time: 376 ms</p>
<p>Compare the above Transact-SQL script to the one below, where the boldfaced code is moved outside of the loop:</p>
<p><pre class="brush:tsql">-- Loop with code outside = efficient</pre></p>
<p><pre class="brush:tsql">SET NOCOUNT ON
DECLARE @separator VARCHAR(25), @message   VARCHAR(25), @counter   SMALLINT
SET  @counter = 0, @separator = REPLICATE( '-', 25 )
WHILE @counter &lt; 100
BEGIN
SET @counter = @counter + 1
PRINT  @separator
SET @message = Str( @counter, 10 ) + Str( SQRT( CONVERT( FLOAT, @counter ) ), 10, 4 )
PRINT  @message
END</pre></p>
<p>&#8211; Elapsed time: 36 ms</p>
<p>The second script executes the REPLICATE( ‘-‘, 25 ) function only once, compared to 100 times in the first script. Results produced by both scripts are identical:</p>
<p><pre class="brush:tsql">-------------------------
1    1.0000
-------------------------
2    1.4142
-------------------------
3    1.7321
-------------------------
4    2.0000
. . .
. . .
. . .
-------------------------
99    9.9499
-------------------------
100   10.0000</pre></p>
<p>Of course, there are a million and one ways to perform any such algorithm.  But I&#8217;m still surprised that otherwise experienced and competent database programmers are still embedding very stable elements of their code inside of extensive looping operations rather than outside of them.  Thoughts?</p>
<p>Cheers,</p>
<p>-Kev</p>




	<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Ftransact-sql-t-sql%2Fwhy-do-i-keep-seeing-this-mistake%2F&amp;title=Why%20do%20I%20keep%20seeing%20this%20mistake%3F&amp;bodytext=One%20of%20the%20fundamentals%20of%20loop%20optimization%20is%20that%20you%20should%20move%20stable%20operations%20outside%20of%20the%20loop.%20%20What%20I%20want%20to%20know%20is%20-%20if%20this%20is%20such%20a%20fundamental%20rule%2C%20why%20do%20so%20many%20people%20break%20it%3F%21%3F%0D%0A%0D%0AIf%20you%20are%20familiar%20with%20other%20programming%20" title="Digg"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://delicious.com/post?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Ftransact-sql-t-sql%2Fwhy-do-i-keep-seeing-this-mistake%2F&amp;title=Why%20do%20I%20keep%20seeing%20this%20mistake%3F&amp;notes=One%20of%20the%20fundamentals%20of%20loop%20optimization%20is%20that%20you%20should%20move%20stable%20operations%20outside%20of%20the%20loop.%20%20What%20I%20want%20to%20know%20is%20-%20if%20this%20is%20such%20a%20fundamental%20rule%2C%20why%20do%20so%20many%20people%20break%20it%3F%21%3F%0D%0A%0D%0AIf%20you%20are%20familiar%20with%20other%20programming%20" title="del.icio.us"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Ftransact-sql-t-sql%2Fwhy-do-i-keep-seeing-this-mistake%2F&amp;title=Why%20do%20I%20keep%20seeing%20this%20mistake%3F" title="DZone"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Ftransact-sql-t-sql%2Fwhy-do-i-keep-seeing-this-mistake%2F&amp;title=Why%20do%20I%20keep%20seeing%20this%20mistake%3F" title="DotNetKicks"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Ftransact-sql-t-sql%2Fwhy-do-i-keep-seeing-this-mistake%2F&amp;title=Why%20do%20I%20keep%20seeing%20this%20mistake%3F&amp;annotation=One%20of%20the%20fundamentals%20of%20loop%20optimization%20is%20that%20you%20should%20move%20stable%20operations%20outside%20of%20the%20loop.%20%20What%20I%20want%20to%20know%20is%20-%20if%20this%20is%20such%20a%20fundamental%20rule%2C%20why%20do%20so%20many%20people%20break%20it%3F%21%3F%0D%0A%0D%0AIf%20you%20are%20familiar%20with%20other%20programming%20" title="Google Bookmarks"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://ping.fm/ref/?link=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Ftransact-sql-t-sql%2Fwhy-do-i-keep-seeing-this-mistake%2F&amp;title=Why%20do%20I%20keep%20seeing%20this%20mistake%3F&amp;body=One%20of%20the%20fundamentals%20of%20loop%20optimization%20is%20that%20you%20should%20move%20stable%20operations%20outside%20of%20the%20loop.%20%20What%20I%20want%20to%20know%20is%20-%20if%20this%20is%20such%20a%20fundamental%20rule%2C%20why%20do%20so%20many%20people%20break%20it%3F%21%3F%0D%0A%0D%0AIf%20you%20are%20familiar%20with%20other%20programming%20" title="Ping.fm"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Ftransact-sql-t-sql%2Fwhy-do-i-keep-seeing-this-mistake%2F&amp;title=Why%20do%20I%20keep%20seeing%20this%20mistake%3F" title="Reddit"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Ftransact-sql-t-sql%2Fwhy-do-i-keep-seeing-this-mistake%2F&amp;title=Why%20do%20I%20keep%20seeing%20this%20mistake%3F" title="StumbleUpon"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" href="" title="TwitThis"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a>


<br/><br/><img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/8ubySAv5iu8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/transact-sql-t-sql/why-do-i-keep-seeing-this-mistake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/transact-sql-t-sql/why-do-i-keep-seeing-this-mistake/</feedburner:origLink></item>
		<item>
		<title>CBusPASS Meeting in Review</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/V0tiBYCfFiE/</link>
		<comments>http://sqlserverpedia.com/blog/sql-server-bloggers/cbuspass-meeting-in-review/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 11:41:27 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[SQL Server Bloggers]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=745</guid>
		<description><![CDATA[We had another CBusPASS meeting last night. I would love to say that things went off without a hitch, but that was not the case.
Due to circumstances outside of anyone&#8217;s control our speaker, Andy Leonard, was very late getting signed in to LiveMeeting. What do you do when you have a room full of SQL [...]]]></description>
			<content:encoded><![CDATA[<p>We had another <a href='http://columbus.sqlpass.org' >CBusPASS</a> meeting last night. I would love to say that things went off without a hitch, but that was not the case.</p>
<p>Due to circumstances outside of anyone&#8217;s control our speaker, Andy Leonard, was very late getting signed in to LiveMeeting. What do you do when you have a room full of SQL Server people? You talk shop!</p>
<p>Over the course of the evening we talked about how to <a href='http://blog.sqlauthority.com/2009/05/09/sql-server-find-last-date-time-updated-for-any-table/'>find the date when data was last inserted into a table</a>, how to cope with rapidly growing data, future presentations for the user group, future presentations within PASS and the local community, performance on virtual machines, and a few other things that I can&#8217;t remember off the top of my head.</p>
<p>Andy&#8217;s presentation was phenomenal. I thought I knew at least enough about SSIS to call my self competent. After last night&#8217;s presentation on Change Data Capture and Incremental Loading with SSIS, I know that I have a lot left to learn. The best thing about a great presenter and a great presentation is that 1)they make it look effortless and 2) you walk away having learned so much without realizing it. I know that I took away a great deal from the presentation. Andy graciously stuck around on LiveMeeting and answered audience questions. A big thank you to Andy for donating his evening to sharing his knowledge and experience. And an even bigger thank you to the Leonard family for letting us borrow Andy for the evening.</p>
<p>Going along with last night&#8217;s presentation topic, here are some <a href='http://www.mssqltips.com/category.asp?catid=17' >SSIS tips</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9_syndication?a=JW-4kbxXM0M:6LwCeLds5u4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/facility9_syndication?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9_syndication?a=JW-4kbxXM0M:6LwCeLds5u4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9_syndication?i=JW-4kbxXM0M:6LwCeLds5u4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9_syndication?a=JW-4kbxXM0M:6LwCeLds5u4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9_syndication?i=JW-4kbxXM0M:6LwCeLds5u4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9_syndication?a=JW-4kbxXM0M:6LwCeLds5u4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9_syndication?i=JW-4kbxXM0M:6LwCeLds5u4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9_syndication?a=JW-4kbxXM0M:6LwCeLds5u4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/facility9_syndication?i=JW-4kbxXM0M:6LwCeLds5u4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9_syndication?a=JW-4kbxXM0M:6LwCeLds5u4:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/facility9_syndication?d=zYSYRoQSaQY" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9_syndication/~4/JW-4kbxXM0M" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/V0tiBYCfFiE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/sql-server-bloggers/cbuspass-meeting-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/sql-server-bloggers/cbuspass-meeting-in-review/</feedburner:origLink></item>
		<item>
		<title>Why the DMVs are not a replacement for SQL Trace</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/_qp445xDYXo/</link>
		<comments>http://sqlserverpedia.com/blog/sql-server-bloggers/why-the-dmvs-are-not-a-replacement-for-sql-trace/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 10:39:20 +0000</pubDate>
		<dc:creator>Gail Shaw</dc:creator>
				<category><![CDATA[SQL Server Bloggers]]></category>

		<guid isPermaLink="false">http://sqlinthewild.co.za/?p=222</guid>
		<description><![CDATA[With the introduction of the DMVs in SQL 2005, there&#8217;s now a wealth of information available on every aspect of SQL&#8217;s behaviour. It&#8217;s possible now to interrogate the SQL procedure cache to find out what queries have been running and how well or badly they are performing. So does all this mean that SQL Trace [...]]]></description>
			<content:encoded><![CDATA[<p>With the introduction of the DMVs in SQL 2005, there&#8217;s now a wealth of information available on every aspect of SQL&#8217;s behaviour. It&#8217;s possible now to interrogate the SQL procedure cache to find out what queries have been running and how well or badly they are performing. So does all this mean that SQL Trace is now obsolete?</p>
<p>It does not. The execution stats available through sys.dm_exec_query_stats are only retained while the plan for the query is in cache. As soon as the plan is removed from cache (for whatever reason), the query stats for that query will be discarded. There are also a couple of reasons for a query&#8217;s plan not going into the cache at all.</p>
<p>Let&#8217;s try a quick example. I&#8217;m going to use the AdventureWorks database (SQL 2008), because it&#8217;s convenient. I&#8217;m going to create 4 procedures, run them several times, along with a couple other commands and then compare what a trace shows and what a query of the plan cache shows.</p>
<p><span id="more-222"></span>
<pre class="brush:tsql">Create Procedure GetLatestPriorWeeksTransactions (@WeekEnds DATETIME)
AS

SELECT p.Name, TransactionDate, TransactionType, Quantity, ActualCost
FROM Production.TransactionHistory th inner join Production.Product p on th.ProductID = p.ProductID
WHERE TransactionDate BETWEEN @WeekEnds AND DATEADD(ww,-1,@WeekEnds)

GO

CREATE Procedure ArchiveTransactionHistory (@ArchiveEndDate DATETIME)
AS
Insert Into Production.TransactionHistoryArchive (TransactionID, ProductID, ReferenceOrderID, ReferenceOrderLineID, TransactionDate, TransactionType, Quantity, ActualCost, ModifiedDate)
SELECT TransactionID, ProductID, ReferenceOrderID, ReferenceOrderLineID, TransactionDate, TransactionType, Quantity, ActualCost, ModifiedDate FROM Production.TransactionHistory WHERE TransactionDate &lt; @ArchiveEndDate

DELETE FROM Production.TransactionHistory WHERE TransactionDate &lt; @ArchiveEndDate
GO

CREATE PROCEDURE SalesToday (@ProductID int)
AS
SELECT p.name, sum(sod.lineTotal) AS TotalSales, SUM(OrderQty) AS TotalSold
FROM Sales.SalesOrderHeader soh
INNER JOIN Sales.SalesOrderDetail sod on soh.SalesOrderID = sod.SalesOrderID
INNER JOIN Production.Product p on sod.ProductID = p.ProductID
WHERE DATEADD(dd,dateDiff(dd,0,soh.OrderDate),0) = DATEADD(dd,dateDiff(dd,0,GETDATE()),0)
GO

CREATE PROCEDURE PersonSearch (
@Surname Varchar(50) = NULL,
@FirstName Varchar(50) = NULL
)
WITH RECOMPILE
AS

SELECT Firstname, middlename, LastName from Person.Person
where (LastName like @surname + '%' OR @Surname IS NULL)
AND (FirstName like @FirstName + '%' OR @FirstName IS NULL)
GO</pre>
<p>I&#8217;m going to use the same trace definition that I detailed in the <a href="http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/">article that I wrote for Simple-Talk</a>, and use the same technique as is in the article to load the trace up and get aggregated totals.</p>
<p>When I query the plan cache, this is what I get back from it.</p>
<p><img class="alignnone size-full wp-image-265" title="Procedure Cache" src="http://sqlinthewild.co.za/wp-content/uploads/2009/07/proccache.png" alt="" width="500" height="96" /></p>
<p>And this is what I got from the trace (with the queries relating to the trace removed)</p>
<p><img class="alignnone size-full wp-image-266" title="Trace" src="http://sqlinthewild.co.za/wp-content/uploads/2009/07/trace.png" alt="" width="499" height="137" /></p>
<p>So why the discrepancy?</p>
<p>Let&#8217;s start with the entries returned in the query of the trace, not the procedure cache.</p>
<p>The ALTER PROCEDURE wouldn&#8217;t be visible in a query of the procedure cache, because DDL statements don&#8217;t have execution plans. There&#8217;s only one way to run an ALTER PROCEDURE, so there&#8217;s no need for a plan, hence there&#8217;s nothing to cache and nothing for the query stats to hook off.</p>
<p>According to the procedure cache, the PersonSearch procedure was never run, but the trace records 35 executions. There&#8217;s no entry for this procedure in the cache, because it&#8217;s marked WITH RECOMPILE. Since a new plan has to be compiled on each execution, the plan is never cached and hence it will never be visible in a query of the plan cache and there will never be saved execution statistics for it.</p>
<p>Now, how about the two with very different execution counts? In each of those cases, something happened to throw the procedure&#8217;s existing plan out of cache part way through the test. When the plan gets thrown from cache the query stats get discarded as well.</p>
<p>In the case of the SalesToday procedure, the procedure was altered part way through the test. Altering a procedure or any object that the procedure depends apon will invalidate the cached plan and cause it to be discarded</p>
<p>The other procedure, GetLatestPriorWeeksTransactions, had it&#8217;s plan invalidated due to a statistics update. The archiving of TransactionHistory changed enough rows in the table that the next time a query ran it triggered a statistics update. That statistics update would have invalidated any plans that used those statistics. In general, this doesn&#8217;t have to be stats update on a permanent table. If a procedure uses a temp table and adds rows to that temp table, there&#8217;s a good chance of getting statistics-based recompiles of statements within that procedure, thereby skewing the results of queries against the plan cache.</p>
<p>In conclusion, while the DMVs exposing the plan cache are very useful in seeing how queries are running, they cannot be seen as a complete replacement for SQL Trace because of the possibility of certain types of commands not getting cached at all, and the possibility of plans getting invalidated and dropped from cache for various reasons.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SqlInTheWild_Syndication?a=JreXBDvZJ3A:Pvdy6OznyKU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SqlInTheWild_Syndication?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SqlInTheWild_Syndication?a=JreXBDvZJ3A:Pvdy6OznyKU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SqlInTheWild_Syndication?i=JreXBDvZJ3A:Pvdy6OznyKU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/_qp445xDYXo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/sql-server-bloggers/why-the-dmvs-are-not-a-replacement-for-sql-trace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/sql-server-bloggers/why-the-dmvs-are-not-a-replacement-for-sql-trace/</feedburner:origLink></item>
		<item>
		<title>Index Defrag Script Update</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/fSvcoiEzSXk/</link>
		<comments>http://sqlserverpedia.com/blog/sql-server-bloggers/index-defrag-script-update/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 16:45:02 +0000</pubDate>
		<dc:creator>Michelle Ufford</dc:creator>
				<category><![CDATA[SQL Server Bloggers]]></category>

		<guid isPermaLink="false">http://sqlfool.com/?p=1082</guid>
		<description><![CDATA[A couple of people pointed out to me that the stats rebuild feature in my defrag script will only complete for one database.  Whoopsies!  I&#8217;ve fixed the bug and updated the script in my previous post, so if you&#8217;re using my defrag script, please update it.  Thanks to Derick and SuperCoolMoss for [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of people pointed out to me that the stats rebuild feature in my defrag script will only complete for one database.  Whoopsies!  I&#8217;ve fixed the bug and updated the script in my <a href="http://sqlfool.com/2009/06/index-defrag-script-v30/" >previous post</a>, so if you&#8217;re using my defrag script, please update it.  Thanks to Derick and SuperCoolMoss for letting me know about the bug.  </p>
<p>I&#8217;ve also received a couple of other requests for feature enhancements.  I&#8217;m currently swamped at work and outside of work, but as soon as I get time, I will release the latest version.  Realistically, it&#8217;ll probably be sometime after summer ends.  <img src='http://sqlfool.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thank you to everyone for their comments and suggestions!</p>
<img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/fSvcoiEzSXk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/sql-server-bloggers/index-defrag-script-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/sql-server-bloggers/index-defrag-script-update/</feedburner:origLink></item>
		<item>
		<title>VLDBs and Instant File Initialization</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/67nxwNtPgcE/</link>
		<comments>http://sqlserverpedia.com/blog/sql-server-management/vldbs-and-instant-file-initialization/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 14:30:02 +0000</pubDate>
		<dc:creator>Brent Ozar</dc:creator>
				<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[SQL Server Management]]></category>

		<guid isPermaLink="false">http://sqlserverpedia.com/blog/?p=6328</guid>
		<description><![CDATA[Very Large Databases (VLDBs) come with their own unique set of management challenges.  In this podcast, Brent Ozar talks about a simple problem: managing file growth when your files are hundreds of gigabytes or larger.
For more about Instant File Initialization and other VLDB tips, check out our Very Large Databases wiki article.
Subscribing or Downloading the [...]]]></description>
			<content:encoded><![CDATA[<p>Very Large Databases (VLDBs) come with their own unique set of management challenges.  In this podcast, Brent Ozar talks about a simple problem: managing file growth when your files are hundreds of gigabytes or larger.</p>
[See post to watch Flash video]
<p>For more about Instant File Initialization and other VLDB tips, <a href="http://sqlserverpedia.com/wiki/Very_Large_Databases_(VLDBs)">check out our Very Large Databases wiki article</a>.</p>
<h3>Subscribing or Downloading the Podcast</h3>
<p>If you have an MP3 player or a portable video player and you want to download our videos automatically, you can subscribe to our podcast feeds here:</p>
<ul>
<li><a href="http://feeds.feedburner.com/SqlserverpediaSqlServerTutorialPodcastMP4">MP4 (Apple) Video Feed</a></li>
<li><a href="http://feeds.feedburner.com/SqlserverpediaSqlServerTutorialPodcastWMV">WMV (Microsoft) Video Feed</a></li>
<li><a href="http://feeds.feedburner.com/SqlserverpediaSqlServerTutorialPodcastMP3">MP3 Audio-Only Feed</a></li>
<li><a href="zune://subscribe/?SQLServerPedia%20Video=http://feeds.feedburner.com/SqlserverpediaSqlServerTutorialPodcastMP4">Zune One-Click Subscribe for Video</a></li>
<li><a href="zune://subscribe/?SQLServerPedia%20Audio=http://feeds.feedburner.com/SqlserverpediaSqlServerTutorialPodcastMP3">Zune One-Click Subscribe for MP3</a></li>
</ul>
<p>You can also download this video to watch it later:</p>
<ul>
<li><a href="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090702-InstantFileInit.mp4">MP4 (Apple) Video Download</a></li>
<li><a href="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090702-InstantFileInit.wmv">WMV (Microsoft) Video Download</a></li>
<li><a href="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090702-InstantFileInit.mp3">MP3 Audio-Only Download</a></li>
</ul>




	<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Fsql-server-management%2Fvldbs-and-instant-file-initialization%2F&amp;title=VLDBs%20and%20Instant%20File%20Initialization&amp;bodytext=Very%20Large%20Databases%20%28VLDBs%29%20come%20with%20their%20own%20unique%20set%20of%20management%20challenges.%C2%A0%20In%20this%20podcast%2C%20Brent%20Ozar%20talks%20about%20a%20simple%20problem%3A%20managing%20file%20growth%20when%20your%20files%20are%20hundreds%20of%20gigabytes%20or%20larger.%0D%0A%0D%0A%0D%0AFor%20more%20about%20Instant%20Fi" title="Digg"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://delicious.com/post?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Fsql-server-management%2Fvldbs-and-instant-file-initialization%2F&amp;title=VLDBs%20and%20Instant%20File%20Initialization&amp;notes=Very%20Large%20Databases%20%28VLDBs%29%20come%20with%20their%20own%20unique%20set%20of%20management%20challenges.%C2%A0%20In%20this%20podcast%2C%20Brent%20Ozar%20talks%20about%20a%20simple%20problem%3A%20managing%20file%20growth%20when%20your%20files%20are%20hundreds%20of%20gigabytes%20or%20larger.%0D%0A%0D%0A%0D%0AFor%20more%20about%20Instant%20Fi" title="del.icio.us"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Fsql-server-management%2Fvldbs-and-instant-file-initialization%2F&amp;title=VLDBs%20and%20Instant%20File%20Initialization" title="DZone"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Fsql-server-management%2Fvldbs-and-instant-file-initialization%2F&amp;title=VLDBs%20and%20Instant%20File%20Initialization" title="DotNetKicks"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Fsql-server-management%2Fvldbs-and-instant-file-initialization%2F&amp;title=VLDBs%20and%20Instant%20File%20Initialization&amp;annotation=Very%20Large%20Databases%20%28VLDBs%29%20come%20with%20their%20own%20unique%20set%20of%20management%20challenges.%C2%A0%20In%20this%20podcast%2C%20Brent%20Ozar%20talks%20about%20a%20simple%20problem%3A%20managing%20file%20growth%20when%20your%20files%20are%20hundreds%20of%20gigabytes%20or%20larger.%0D%0A%0D%0A%0D%0AFor%20more%20about%20Instant%20Fi" title="Google Bookmarks"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://ping.fm/ref/?link=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Fsql-server-management%2Fvldbs-and-instant-file-initialization%2F&amp;title=VLDBs%20and%20Instant%20File%20Initialization&amp;body=Very%20Large%20Databases%20%28VLDBs%29%20come%20with%20their%20own%20unique%20set%20of%20management%20challenges.%C2%A0%20In%20this%20podcast%2C%20Brent%20Ozar%20talks%20about%20a%20simple%20problem%3A%20managing%20file%20growth%20when%20your%20files%20are%20hundreds%20of%20gigabytes%20or%20larger.%0D%0A%0D%0A%0D%0AFor%20more%20about%20Instant%20Fi" title="Ping.fm"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Fsql-server-management%2Fvldbs-and-instant-file-initialization%2F&amp;title=VLDBs%20and%20Instant%20File%20Initialization" title="Reddit"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsqlserverpedia.com%2Fblog%2Fsql-server-management%2Fvldbs-and-instant-file-initialization%2F&amp;title=VLDBs%20and%20Instant%20File%20Initialization" title="StumbleUpon"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" href="" title="TwitThis"><img src="http://sqlserverpedia.com/blog/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a>


<br/><br/><img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/67nxwNtPgcE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/sql-server-management/vldbs-and-instant-file-initialization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>

<enclosure url="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090702-InstantFileInit.wmv" length="10292705" type="video/x-ms-wmv" />
<enclosure url="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090702-InstantFileInit.mp3" length="2804005" type="audio/mpeg" />
		<feedburner:origLink>http://sqlserverpedia.com/blog/sql-server-management/vldbs-and-instant-file-initialization/</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/sqlserverpedia/~5/wp0eQC3uosA/SQLServerPedia-20090702-InstantFileInit.mp4" length="22040999" type="video/mp4" /><feedburner:origEnclosureLink>http://tutorials.sqlserverpedia.com/SQLServerPedia-20090702-InstantFileInit.mp4</feedburner:origEnclosureLink></item>
		<item>
		<title>What I Want Versus What I Can Afford</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/FLThEIvUtdg/</link>
		<comments>http://sqlserverpedia.com/blog/sql-server-bloggers/what-i-want-versus-what-i-can-afford/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 13:30:54 +0000</pubDate>
		<dc:creator>Brent Ozar</dc:creator>
				<category><![CDATA[SQL Server Bloggers]]></category>

		<guid isPermaLink="false">http://www.brentozar.com/?p=4371</guid>
		<description><![CDATA[I got an interesting comment on my article about the Top 10 Interview Questions for Senior DBAs.  AngryDBA said:
&#8220;Man, I don’t mean to sound harsh but..you’re an expert DBA? I’m guessing you wouldn’t survive one of my interviews. I only expect the candidates to get 50%. I’ve had them all too. PhDs, Masters in blah-blah-blah, [...]]]></description>
			<content:encoded><![CDATA[<p>I got an interesting comment on my article about the <a href="http://www.brentozar.com/archive/2009/01/top-10-interview-questions-to-ask-senior-dbas/">Top 10 Interview Questions for Senior DBAs</a>.  AngryDBA said:</p>
<p style="padding-left: 30px;"><em>&#8220;Man, I don’t mean to sound harsh but..you’re an expert DBA? I’m guessing you wouldn’t survive one of my interviews. I only expect the candidates to get 50%. I’ve had them all too. PhDs, Masters in blah-blah-blah, Captain of the Patterns Team at Yale majoring in C#, writing joins since she was in Pampers. Uh huh.&#8221;</em></p>
<p>Answering this requires more than just a comment.</p>
<h3>My Dream House Checklist</h3>
<div id="attachment_4372" class="wp-caption alignright" style="width: 310px"><a href="http://www.inhabitat.com/2008/11/07/chestnut-house-by-lpa-architects/"><img class="size-medium wp-image-4372" title="dream-yard" src="http://i.brentozar.com/wp-content/uploads/2009/07/dream-yard-300x200.jpg" alt="My Kind of Yard" width="300" height="200" /></a><p class="wp-caption-text">My Kind of Yard</p></div>
<p>I use <a href="http://www.rememberthemilk.com">RememberTheMilk</a> to store a lot of stuff, including my list of things that I&#8217;m looking for in my dream house. I&#8217;m planning long term, baby! It includes things like:</p>
<ul>
<li><strong>No ground-level windows</strong> &#8211; we don&#8217;t like people looking in or breaking in.  We like high windows on the ground floor (like 7&#8242; up).  The other floors can have floor to ceiling windows, though.</li>
<li><strong>On the water, but no nearby vegetation</strong> &#8211; we hate bugs.  Ideally, there wouldn&#8217;t be a plant on the property.  I&#8217;m not kidding.</li>
<li><strong>Within walking distance of at least 2 restaurants</strong> &#8211; Erika and I really enjoy eating at restaurants.  It&#8217;s nice to have other people take care of everything once in a while.  Okay, often.</li>
<li><strong>Gadget nook in the entryway</strong> &#8211; I like having my electronic gear near the door so that I can grab it on the way out.  Ideally, I&#8217;d have an inset nook in the wall with electric outlets, and the whole thing would be concealed so that wires weren&#8217;t dangling all over the place.</li>
<li><strong>Lots of AC ventilation in the kitchen</strong> &#8211; we love a really cold house.  I&#8217;m talkin&#8217; 65 degrees.  Erika loves to cook, but the kitchen always gets hot, because no house&#8217;s AC is ever designed to pump that much cold air into the kitchen while keeping the rest of the house tolerable.  Speaking of which&#8230;.</li>
<li><strong>Very powerful but very quiet AC</strong> &#8211; I don&#8217;t want to hear the air conditioning kick on and off, but I want the house at 65, and no, the answer isn&#8217;t leaving the air running full blast 24/7.</li>
<li><strong>Silent garage door openers</strong> &#8211; I get up early in the morning and I like taking drives.  I hate it when the garage door opener vibrates in a way that you can hear it in the bedroom.  (Yes, there&#8217;s a lot of silent items on this list.)</li>
</ul>
<p>I could go on and on &#8211; the checklist has over 20 items on it at the moment.  That doesn&#8217;t include my set of tear sheets with all of the interior design features and furnishings we&#8217;ve liked over the years, too, or <a href="http://delicious.com/brento/dreamhouse">my Delicious bookmarks tagged dreamhouse</a>.</p>
<h3>My Current Housing Checklist</h3>
<div id="attachment_4373" class="wp-caption alignright" style="width: 310px"><a href="http://www.flickr.com/photos/pathenson/2156979232/"><img class="size-medium wp-image-4373" title="abandoned-building" src="http://i.brentozar.com/wp-content/uploads/2009/07/abandoned-building-300x200.jpg" alt="My Kind of Price" width="300" height="200" /></a><p class="wp-caption-text">My Kind of Price</p></div>
<p>Back in the real world, since I&#8217;m not making seven figures (yet), my housing search checklist is decidedly more utilitarian:</p>
<ul>
<li><strong>Washer/dryer connections</strong> &#8211; I don&#8217;t want to go to a community laundry facility.</li>
<li><strong>Good phone/cable wiring</strong> &#8211; I need high speed internet access and old building wiring presents problems with that.</li>
<li><strong>Two parking spots</strong> &#8211; we&#8217;re looking at downtown one-bedroom lofts, and those don&#8217;t always come with two spots.</li>
<li><strong>Low crime rate</strong> &#8211; I don&#8217;t want to have to carry a gun when I walk the dog.</li>
</ul>
<p>Notice the difference?  Champagne tastes, beer budget.  I can&#8217;t go asking about waterfront property with what I&#8217;m payin&#8217;.  Asking about waterfront property when I can&#8217;t afford it doesn&#8217;t make me look good &#8211; and in fact, my real estate agent is pretty quickly going to start rolling her eyes when I call.  &#8220;Here comes this bozo again, asking about waterfront property for fifty large.  What a jerk.&#8221;</p>
<h3>How This Relates to Database Administrators</h3>
<p>If money wasn&#8217;t an object, my interview question list would simply be:</p>
<ul>
<li>Is your name Paul Randal?</li>
</ul>
<p>However, money is <strong>always</strong> an object.  Even when you think money isn&#8217;t an object, you have to ask yourself if you would hire one super-expert-senior DBA, or hire two solid but not super-expert DBAs.  My DBA interview questions aren&#8217;t designed to separate Paul Randal from the rest &#8211; they&#8217;re designed for companies who need to find somebody reliable without spending a fortune.</p>
<p>One of my favorite sayings is that there&#8217;s two kinds of questions: the ones designed to find out how much the other person knows, and the ones designed to show off how much you know.  Showing off in interviews doesn&#8217;t impress the candidate &#8211; and in fact, it does the exact opposite.  Humiliating a candidate makes them bitter about your company before you even make them an offer.  If your candidates rarely achieve 50%, then you&#8217;ve got a disconnect between your tastes and your budget.</p>
<p>Start asking questions that your candidates might be able to answer.</p>
<p>Otherwise, you&#8217;re just showing them you&#8217;ve got a lot of DBA-ness.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrentOzar-SqlServerDbaSqlserverpediaSyndication?a=z-tLMlJsG2c:3nmN4YfL0Qw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrentOzar-SqlServerDbaSqlserverpediaSyndication?i=z-tLMlJsG2c:3nmN4YfL0Qw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrentOzar-SqlServerDbaSqlserverpediaSyndication?a=z-tLMlJsG2c:3nmN4YfL0Qw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrentOzar-SqlServerDbaSqlserverpediaSyndication?i=z-tLMlJsG2c:3nmN4YfL0Qw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrentOzar-SqlServerDbaSqlserverpediaSyndication?a=z-tLMlJsG2c:3nmN4YfL0Qw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrentOzar-SqlServerDbaSqlserverpediaSyndication?i=z-tLMlJsG2c:3nmN4YfL0Qw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrentOzar-SqlServerDbaSqlserverpediaSyndication?a=z-tLMlJsG2c:3nmN4YfL0Qw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrentOzar-SqlServerDbaSqlserverpediaSyndication?i=z-tLMlJsG2c:3nmN4YfL0Qw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/FLThEIvUtdg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/sql-server-bloggers/what-i-want-versus-what-i-can-afford/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/sql-server-bloggers/what-i-want-versus-what-i-can-afford/</feedburner:origLink></item>
		<item>
		<title>Object Naming Standards</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/vStKIvw2Uxk/</link>
		<comments>http://sqlserverpedia.com/blog/sql-server-bloggers/object-naming-standards/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 02:35:00 +0000</pubDate>
		<dc:creator>Scott Herbert</dc:creator>
				<category><![CDATA[SQL Server Bloggers]]></category>

		<guid isPermaLink="false">tag:blogger.com,1999:blog-4405194173885586991.post-8394714637191267883</guid>
		<description><![CDATA[Having a look through the new features of SQL2008, I was intrigued to find the new Declarative Management Framework. In short, it's a way to enforce various policies on your environments. <br /><br />Without going too far into it (in this post), it made me think about what kinds of policies or standards I like to enforce as a Team Leader. <br /><br />One particular area is in object naming conventions. This is always going to be an idiosyncratic/personal aspect of programming, but I’ve found that if one person takes the initiative, other people will follow. An agreed standard makes it easy to predict what an object will be called, cutting down on searching and guessing when you’re not familiar with a schema that someone else has designed.<br /><br />Tables:<br />- No tables have a plural name, i.e. “Lottery.Entry”, not “Lottery.Entries”<br /><br />Stored Procedures<br />- have the prefix “s”<br />- wherever possible include the main object they reference, what they are doing to the object, and by what parameters (if any, and only when there’s only one or two, otherwise use “filters” or “various” etc.)  in the format “s[OBJECTNAME][ACTION]by[PARAMETERS]”. The main point is the object name and the action. This is open to a fair bit of interpretation, but here’s some examples<br />o Lottery.sEntrySelectByID<br />o Lottery.sEntryInsert<br />o Lottery.sResultSelectByFilters<br />o Lottery.sPredictionUpdate<br /><br />- no underscores. One of my bugbears is guessing whether or not an underscore might separate one part of an object name from another. The simplest answer is to not use them<br /><br />Views<br />- have the prefix “v”<br />- if they return fields from one table only, then they are named “v[TableName]”<br />- it they return fields mostly from one table, and reference other tables/views in order to bring back names etc,. for IDs in the original table, then they are named “v[TableName]Overview”<br />- no underscores<br /><br />Triggers<br />- prefixed with “trig”<br />- suffixed with “AfterInsert”, “InsteadOfInsert” etc<br />- example: Lottery.trigEntryAfterInsert<br /><br />Functions<br />- same rules as for stored procedures, but prefixed with “f”<br /><br />Keys<br />- prefixed with “pk” for primary, “fk” for foreign, “uq” for unique<br />- perhaps “uk” would be more consistent for uniques? Hmmm I may have stuffed that one up over the last few years….<br />- reference the object name and the fields: e.g. fkEntry_LotteryID<br />- hey what’s that underscore doing there? I’m fine with underscores in objects that are rarely referenced which writing code off the top of your head. I think they’re fine in keys, indices etc., anything that’s not a view, proc or table<br /><br />Indices<br />- ixTABLENAME_FieldName1_FieldName2 etc<br />- no need to reference INCLUDEd columns<br /><br />Constraints<br />- “df” prefix for default constraints, e.g. dfEntryName<br />- “ck” prefix for Check Constraints<br /><br />I’m sure there are plenty of people who would vehemently disagree with some of the choices I’ve made above. That’s great, and I’d love to hear why! My main point though is that having standards helps save time by making it easy for fellow developers/DBAs to predict what your objects are called when they’re searching for them. In a database like the main one I manage at the moment, where there are now over 10,000 objects, this can save some of the precious sanity we have left.<div class="blogger-post-footer"><img width='1' height='1'></div>]]></description>
			<content:encoded><![CDATA[Having a look through the new features of SQL2008, I was intrigued to find the new Declarative Management Framework. In short, it's a way to enforce various policies on your environments. <br /><br />Without going too far into it (in this post), it made me think about what kinds of policies or standards I like to enforce as a Team Leader. <br /><br />One particular area is in object naming conventions. This is always going to be an idiosyncratic/personal aspect of programming, but I’ve found that if one person takes the initiative, other people will follow. An agreed standard makes it easy to predict what an object will be called, cutting down on searching and guessing when you’re not familiar with a schema that someone else has designed.<br /><br />Tables:<br />- No tables have a plural name, i.e. “Lottery.Entry”, not “Lottery.Entries”<br /><br />Stored Procedures<br />- have the prefix “s”<br />- wherever possible include the main object they reference, what they are doing to the object, and by what parameters (if any, and only when there’s only one or two, otherwise use “filters” or “various” etc.)  in the format “s[OBJECTNAME][ACTION]by[PARAMETERS]”. The main point is the object name and the action. This is open to a fair bit of interpretation, but here’s some examples<br />o Lottery.sEntrySelectByID<br />o Lottery.sEntryInsert<br />o Lottery.sResultSelectByFilters<br />o Lottery.sPredictionUpdate<br /><br />- no underscores. One of my bugbears is guessing whether or not an underscore might separate one part of an object name from another. The simplest answer is to not use them<br /><br />Views<br />- have the prefix “v”<br />- if they return fields from one table only, then they are named “v[TableName]”<br />- it they return fields mostly from one table, and reference other tables/views in order to bring back names etc,. for IDs in the original table, then they are named “v[TableName]Overview”<br />- no underscores<br /><br />Triggers<br />- prefixed with “trig”<br />- suffixed with “AfterInsert”, “InsteadOfInsert” etc<br />- example: Lottery.trigEntryAfterInsert<br /><br />Functions<br />- same rules as for stored procedures, but prefixed with “f”<br /><br />Keys<br />- prefixed with “pk” for primary, “fk” for foreign, “uq” for unique<br />- perhaps “uk” would be more consistent for uniques? Hmmm I may have stuffed that one up over the last few years….<br />- reference the object name and the fields: e.g. fkEntry_LotteryID<br />- hey what’s that underscore doing there? I’m fine with underscores in objects that are rarely referenced which writing code off the top of your head. I think they’re fine in keys, indices etc., anything that’s not a view, proc or table<br /><br />Indices<br />- ixTABLENAME_FieldName1_FieldName2 etc<br />- no need to reference INCLUDEd columns<br /><br />Constraints<br />- “df” prefix for default constraints, e.g. dfEntryName<br />- “ck” prefix for Check Constraints<br /><br />I’m sure there are plenty of people who would vehemently disagree with some of the choices I’ve made above. That’s great, and I’d love to hear why! My main point though is that having standards helps save time by making it easy for fellow developers/DBAs to predict what your objects are called when they’re searching for them. In a database like the main one I manage at the moment, where there are now over 10,000 objects, this can save some of the precious sanity we have left.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4405194173885586991-8394714637191267883?l=sqlninja.blogspot.com'/></div><img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/vStKIvw2Uxk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/sql-server-bloggers/object-naming-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/sql-server-bloggers/object-naming-standards/</feedburner:origLink></item>
		<item>
		<title>Quick Tip: TempDB on a multi-core SQL Server box</title>
		<link>http://feedproxy.google.com/~r/sqlserverpedia/~3/MI5wgIiBm7w/</link>
		<comments>http://sqlserverpedia.com/blog/sql-server-bloggers/quick-tip-tempdb-on-a-multi-core-sql-server-box/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 01:38:03 +0000</pubDate>
		<dc:creator>Stuart Ainsworth</dc:creator>
				<category><![CDATA[SQL Server Bloggers]]></category>

		<guid isPermaLink="false">http://codegumbo.com/?p=333</guid>
		<description><![CDATA[Just learned this today from one of the Microsoft support reps reviewing our SQL Server 2008 box for performance optimizations: if you are running SQL Server on a multi-core box, you should set up tempdb to have as many data files as there are physical CPU’s (up to a reasonable limit).&#160; These files should also [...]]]></description>
			<content:encoded><![CDATA[<p>Just learned this today from one of the Microsoft support reps reviewing our SQL Server 2008 box for performance optimizations: if you are running SQL Server on a multi-core box, you should set up tempdb to have as many data files as there are physical CPU’s (up to a reasonable limit).&nbsp; These files should also be equally sized.&nbsp; In other words, if you need a 6GB tempdb, and you have 2 cores, you’d want to have 2 3GB files.&nbsp; If you have 16 cores, you can probably limit it to 8 files of 750 MB.&nbsp; In a 32 core box, you may benefit from additional files, but you probably want to test to see.</p>
<p>The reason for this (as it was explained to me) is that on a high-transaction server, there is the possibility that the file I/O associated with the creation and destruction of temporary objects may cause blocking on parallel CPU operations. For example, CPU0 may run a stored procedure that uses temporary tables; CPU1 may also run that same procedure simultaneously.&nbsp; If there is a single tempdb data file, the I/O associated with the creation of the local temp object with the stored procedure being executed on CPU0 may block the creation of the files associated with CPU1, <strong>even though the tables themselves are locally scoped</strong>.&nbsp; </p>
<p>Sizing the files equally also assists the optimizer, as space availability per file is used in considering where to store the local objects.&nbsp;&nbsp; If you have 1 file that is extremely larger than the second file, most of your objects will be created in the larger file, which could also contribute to blocking concerns.&nbsp; In short:</p>
<ul>
<li>Create the same number of tempdb data files as there are physical processors on the server (up to 8), and
<li>Make sure that the data files are equivalently sized.</li>
</ul>
<p>NOTE: Immediately after posting this, I read the following from Kevin Kline.&nbsp; Please note that I am not talking about multiple log files, but rather multiple data files.&nbsp; <a title="http://sqlblog.com/blogs/kevin_kline/archive/2009/06/23/old-performance-tuning-recommendations-die-hard.aspx" href="http://sqlblog.com/blogs/kevin_kline/archive/2009/06/23/old-performance-tuning-recommendations-die-hard.aspx">http://sqlblog.com/blogs/kevin_kline/archive/2009/06/23/old-performance-tuning-recommendations-die-hard.aspx</a></p>
<p>NOTE2: <a href="http://twitter.com/kbriankelley" >@kbriankelley</a> tweeted me shortly after this post, and recommended the following post: <a title="http://www.sqlskills.com/BLOGS/PAUL/post/Search-Engine-QA-12-Should-you-create-multiple-files-for-a-user-DB-on-a-multi-core-box.aspx" href="http://www.sqlskills.com/BLOGS/PAUL/post/Search-Engine-QA-12-Should-you-create-multiple-files-for-a-user-DB-on-a-multi-core-box.aspx">http://www.sqlskills.com/BLOGS/PAUL/post/Search-Engine-QA-12-Should-you-create-multiple-files-for-a-user-DB-on-a-multi-core-box.aspx</a></p>
<p>Apparently, there may be some disagreement about the requirement for the 1-to-1 ratio of data files to cores.&nbsp;&nbsp; Paul Randall indicates that it may be a 1-4 or 1-2 ratio. I don’t know; I had a Microsoftie in the office telling our DBA team that we needed at least 8-10 data files for our 16 core box (and he did specify the 1-1 ratio) .&nbsp; As a database developer, I don’t think about file I/O enough to argue with him.&nbsp; I do think that this is a tip worth investigating and testing, however, which is the reason I posted it.&nbsp; </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Codegumbo?a=ESrbzPZAack:qr9ieqw_bWA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Codegumbo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Codegumbo?a=ESrbzPZAack:qr9ieqw_bWA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Codegumbo?i=ESrbzPZAack:qr9ieqw_bWA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Codegumbo?a=ESrbzPZAack:qr9ieqw_bWA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Codegumbo?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Codegumbo?a=ESrbzPZAack:qr9ieqw_bWA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Codegumbo?i=ESrbzPZAack:qr9ieqw_bWA:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Codegumbo/~4/ESrbzPZAack" height="1" width="1"/><img src="http://feeds.feedburner.com/~r/sqlserverpedia/~4/MI5wgIiBm7w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sqlserverpedia.com/blog/sql-server-bloggers/quick-tip-tempdb-on-a-multi-core-sql-server-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sqlserverpedia.com/blog/sql-server-bloggers/quick-tip-tempdb-on-a-multi-core-sql-server-box/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.269 seconds. --><!-- Cached page generated by WP-Super-Cache on 2009-07-11 18:18:14 -->
