<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>SQLRockstar | Thomas LaRock</title>
	
	<link>http://thomaslarock.com</link>
	<description />
	<lastBuildDate>Wed, 16 May 2012 15:26:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SQLRockstar" /><feedburner:info uri="sqlrockstar" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><feedburner:emailServiceId>SQLRockstar</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>What Toy Story 2 Can Teach You About Testing Your Backups and Recovery Strategy</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/-Oak70A4ZYU/</link>
		<comments>http://thomaslarock.com/2012/05/what-toy-story-2-can-teach-you-about-testing-your-backups-and-recovery-strategy/#comments</comments>
		<pubDate>Wed, 16 May 2012 15:26:41 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[disaster]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[strategy]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8651</guid>
		<description><![CDATA[This is a great little video that helps reinforce a few things.

Make sure your backups are running.
Test your recovery strategy.
Working from home can solve everything.

Can't see the video in your RSS reader or email? Click Here!

What Toy Story 2 Can Teach You About Testing Your Backups and Recovery Strategy is a post from: SQLRockstar &#124; [...]<p><p></p>
<a href="http://thomaslarock.com/2012/05/what-toy-story-2-can-teach-you-about-testing-your-backups-and-recovery-strategy/">What Toy Story 2 Can Teach You About Testing Your Backups and Recovery Strategy</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This is a great little video that helps reinforce a few things.</p>
<ol>
<li>Make sure your backups are running.</li>
<li><a title="The 3 DBA Mistakes You Don’t Know You Are Making" href="http://thomaslarock.com/2012/05/the-3-dba-mistakes-you-dont-know-you-are-making/" target="_blank">Test your recovery strategy</a>.</li>
<li>Working from home can solve everything.</li>
</ol>
<p><iframe title="YouTube video player" width="570" height="315" src="http://www.youtube.com/embed/EL_g0tyaIeE" frameborder="0" allowfullscreen></iframe><div id="tentblogger-vimeo-youtube-message" style="width: 100%; border: 1px solid #e6e6e6; background: #f8f8f4; text-align:center; padding: 0.25em; ">Can't see the video in your RSS reader or email? <a target="_blank" href="http://thomaslarock.com/2012/05/what-toy-story-2-can-teach-you-about-testing-your-backups-and-recovery-strategy/">Click Here!</a></div></p>
<p><p></p>
<a href="http://thomaslarock.com/2012/05/what-toy-story-2-can-teach-you-about-testing-your-backups-and-recovery-strategy/">What Toy Story 2 Can Teach You About Testing Your Backups and Recovery Strategy</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8651"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=-Oak70A4ZYU:yFfarxt3Df4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=-Oak70A4ZYU:yFfarxt3Df4:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=-Oak70A4ZYU:yFfarxt3Df4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=-Oak70A4ZYU:yFfarxt3Df4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=-Oak70A4ZYU:yFfarxt3Df4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=-Oak70A4ZYU:yFfarxt3Df4:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/-Oak70A4ZYU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/05/what-toy-story-2-can-teach-you-about-testing-your-backups-and-recovery-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/05/what-toy-story-2-can-teach-you-about-testing-your-backups-and-recovery-strategy/</feedburner:origLink></item>
		<item>
		<title>The 3 DBA Mistakes You Don’t Know You Are Making</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/z2YoJdSfFys/</link>
		<comments>http://thomaslarock.com/2012/05/the-3-dba-mistakes-you-dont-know-you-are-making/#comments</comments>
		<pubDate>Mon, 14 May 2012 19:00:26 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[mistake]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8638</guid>
		<description><![CDATA[You have no idea that what you are not doing is causing you pain.
Then again, how could you know this? I mean, if you are not doing it, why would you ever think that your inaction could be the very thing that is causing you heartache every time your phone rings in the middle of [...]<p><p></p>
<a href="http://thomaslarock.com/2012/05/the-3-dba-mistakes-you-dont-know-you-are-making/">The 3 DBA Mistakes You Don&#8217;t Know You Are Making</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://thomaslarock.com/2012/05/the-3-dba-mistakes-you-dont-know-you-are-making/warning-sign/" rel="attachment wp-att-8644"><img class="alignleft size-medium wp-image-8644" title="Warning sign" src="http://thomaslarock.com/wp-content/uploads/2012/05/warning-285x300.jpg?9d7bd4" alt="" width="285" height="300" /></a>You have no idea that what you are not doing is causing you pain.</p>
<p>Then again, how could you know this? I mean, if you are not doing it, why would you ever think that your inaction could be the very thing that is causing you heartache every time your phone rings in the middle of the night?</p>
<p>I see DBAs make these three mistakes repeatedly. But they are not a mistake as you might think of a mistake: a misstep along a specified process. No, these mistakes are brought about because the person simply didn&#8217;t know any better.</p>
<p>But they should.</p>
<p>I&#8217;m hoping by listing them here, it will help.</p>
<h3>1. You Don&#8217;t Have A Recovery Plan</h3>
<p>The number one reason for a DBA to exist is this: recovery. It should be your primary focus each and every day. You need to be able to recover from any event, no matter how big or small. Lose an entire data center? You had better be able to recover that data. Lose a handful of LUNs? You had better be able to recover that data. Someone deletes a table? You had better be able to recover that data.</p>
<p>So why then do I see many DBAs spend time focusing on a good backup strategy but never spend an equal amount of time on a recovery strategy? Of course we know that every good recovery strategy <em>must</em> start with a good backup strategy, but so many DBAs (especially novice ones) never bother to test their restore process. Are your backups written to disk, and then saved off to tape? OK, that&#8217;s fine, now&#8230;quick&#8230;how long will it take to recover that tape? If your end user calls and says they need to recover a database from last week, how long before that request can be completed. Here is a better question: how long before your end user become <strong>very</strong> annoyed that they have to wait any longer?</p>
<p>There is only one way to be certain that the backups you have can even be used for recovery: you need to actually recover them without error to be 100% certain. That&#8217;s why I wrote this <a href="http://www.simple-talk.com/sql/database-administration/statistical-sampling-for-verifying-database-backups/" target="_blank">article for Simple-Talk two years ago on how to use statistical sampling in order to be 95% confident</a> that all your backups are valid.</p>
<p>Taking backups is not even half of what you need to do as a DBA. You need to recover, from a variety of failures, and you need to be able to do it as quickly as possible. Having a plan is good, but practicing that plan is even better.</p>
<h3>2. You Pretend That Virtualization Doesn&#8217;t Matter</h3>
<p>I know that VMWare will tell you that running in a virtual environment <a href="http://www.vmware.com/solutions/business-critical-apps/sql/performance.html" target="_blank">can be up to 99% of the performance</a> you have in a physical environment. I also know that when people see that 99% number they decide that they can shove as many guests onto a VMWare host as space will allow for and they still believe they will have 99% performance for each and every instance. This is especially true if those instances are believed to be &#8220;lightly used&#8221;.</p>
<p>The beauty of running your servers in a virtual environment is that you get to share resources and easily migrate guests between hosts. The ugly truth about running your servers in a virtual environment is that you get to share resources and easily migrate guests between hosts.</p>
<p>As a DBA you are now managing a piece of software that runs inside of a guest O/S that is running on a host, that has a hypervisor, and that likely shares its disks with other hosts as well. What that means is that when someone runs a query, that query has to travel down that stack and back again in order to return a result. Now, if someone comes to you and says that they are having a performance issue what would you do first? Would you look at the query? Or the O/S metrics for that guest? Or something else?</p>
<p>Or would you prefer to <a title="Stop Guessing About CPU Pressure" href="http://thomaslarock.com/2012/01/stop-guessing-about-cpu-pressure/">spend five minutes examining the virtual layer</a> to see if any bottlenecks exist. For example, if the host is seeing a spike in disk latency, then it is likely the guests are seeing disk latency as well. So, how much time would you want to spend trying to make a query faster when the issue has to do with an overloaded disk subsystem? I know what my answer is: none. What if the bottleneck is host CPU saturation? How long will you want to spend trying to tune a query when you already know that the issue is at the host layer?</p>
<p>Pretending that virtualization doesn&#8217;t matter for your database servers is a mistake I see being made by both DBAs and server admins. Those counters hold the key to being efficient at performance tuning in a virtual world. But they are only useful if someone knows to be looking at them.</p>
<h3>3. You Don&#8217;t Configure Memory Settings Properly</h3>
<p>This one drives me crazy.</p>
<p>I still see database servers with the default memory settings. When a customer comes to me and complains about having memory issues one of my first questions is: what are your default settings?  At this point I am shocked when someone <em>doesn&#8217;t</em> say &#8220;we left those alone&#8221;. Configuring your default memory setting is one of the easiest thing any DBA can do and should be part of a standard checklist when rolling out a new instance. Yet it still is not happening.</p>
<p>Things get even trickier with memory in a virtual world, as you are competing with other guests for host memory. You simply must know what your memory requirements are for your database server and then work on securing that memory. The easiest way to do this is to configure those memory settings. Even <a title="Misremembering Memory Settings" href="http://thomaslarock.com/2011/03/misremembering-memory-settings/" target="_blank">I can&#8217;t remember everything</a>, so that&#8217;s why I just reference <a href="http://sqlskills.com/blogs/jonathan/post/How-much-memory-does-my-SQL-Server-actually-need.aspx" target="_blank">this post</a> when I need general guidelines regarding the configuration of the min and max memory settings.</p>
<p>There you go, three things that you are likely not doing today and are also equally likely to be causing you and your end users lots of pain.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/05/the-3-dba-mistakes-you-dont-know-you-are-making/">The 3 DBA Mistakes You Don&#8217;t Know You Are Making</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8638"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=z2YoJdSfFys:4xLqq3wyCmQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=z2YoJdSfFys:4xLqq3wyCmQ:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=z2YoJdSfFys:4xLqq3wyCmQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=z2YoJdSfFys:4xLqq3wyCmQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=z2YoJdSfFys:4xLqq3wyCmQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=z2YoJdSfFys:4xLqq3wyCmQ:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/z2YoJdSfFys" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/05/the-3-dba-mistakes-you-dont-know-you-are-making/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/05/the-3-dba-mistakes-you-dont-know-you-are-making/</feedburner:origLink></item>
		<item>
		<title>What Is Your ROE?</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/utyLo8Z8t7k/</link>
		<comments>http://thomaslarock.com/2012/05/what-is-your-roe/#comments</comments>
		<pubDate>Tue, 08 May 2012 19:57:50 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[customer]]></category>
		<category><![CDATA[experience]]></category>
		<category><![CDATA[ROE]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8483</guid>
		<description><![CDATA[It all started with a garbage can.
Not just any old garbage can, mind you. It was this one from SimpleHuman. We&#8217;ve had it for years, and it was wonderful except for one small detail.
It was broken.
The lid would not stay open any longer. The springs underneath had broken away, most likely due to the fact that SimpleHuman [...]<p><p></p>
<a href="http://thomaslarock.com/2012/05/what-is-your-roe/">What Is Your ROE?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://thomaslarock.com/2012/05/what-is-your-roe/top-rated-stamp/" rel="attachment wp-att-8630"><img class="alignleft size-medium wp-image-8630" title="Simply the best" src="http://thomaslarock.com/wp-content/uploads/2012/05/best-300x275.jpg?9d7bd4" alt="Simply the best" width="300" height="275" /></a>It all started with a garbage can.</p>
<p>Not just any old garbage can, mind you. It was <a href="http://www.kitchensource.com/im/sh-cw1570-s3.jpg" rel="prettyPhoto[8483]" target="_blank">this one from SimpleHuman</a>. We&#8217;ve had it for years, and it was wonderful except for one small detail.</p>
<p>It was broken.</p>
<p>The lid would not stay open any longer. The springs underneath had broken away, most likely due to the fact that SimpleHuman didn&#8217;t do any QA testing that involved very small children abusing the lid in many, many ways. Considering the cost  of the can we decided to just deal with the broken lid&#8230;for the past five years.</p>
<p>Because we could not find a replacement lid, earlier this year we considered buying a new can. Before opening my wallet (again) I decided to drop a quick note to SimpleHuman on their website and inquire about getting a replacement part for a can they no longer were offering for sale. Within a few days I got back an email that seemed rather amazing (and I am paraphrasing here):</p>
<p>&#8220;<em>We&#8217;re sending you a replacement</em>.&#8221;</p>
<p>I didn&#8217;t really believe that they were going to send me the part because (1) I don&#8217;t recall giving them my address and (2) there was <em>no way</em> I was covered under any type of warranty. Two weeks later a new lid arrived. I was shocked. And then it hit me: I am now a customer of SimpleHuman for life.</p>
<p>Why am I telling you this? Great question.</p>
<p>I often hear people ask &#8220;what is the ROI for this&#8221;? I think ROI is an awful way to measure something. It is shortsighted at best, typically focused on monetary gains. And ROI is often hard to calculate with any degree of certainty as well. I mean, you know how much something will cost, that part is easy. What you can never predict is how much return you will get. That&#8217;s why the SEC makes companies tell you how &#8220;past performance is no indication of future results&#8221;.</p>
<p>When I hear of someone asking about the ROI on something I often laugh to myself and think &#8220;what&#8217;s the ROI on the water cooler&#8221;? How many times has there been a conversation around the water cooler that has led to something amazing being done? And what is the ROI on that coffee table in the reception area? Can&#8217;t we measure that? What about the ROI on this blog?</p>
<p>I think a much better metric for everyone to digest is this: ROE, or Return On Experience.</p>
<p>Back to SimpleHuman. My experience with them as a customer has resulted in my loyalty. Even if I never buy something from them again the experience has led to me singing their praises in this blog post. If they had said to me &#8220;hey Tom, here&#8217;s $100 to write something nice about us&#8221; I would have refused. But that is essentially what happened, right? They gave me something of monetary value, sure, but they also gave me an experience that has more than just money behind it.</p>
<p>Now, stop and think for a minute. Think about your customers. Think about the end users for the systems you build and maintain.</p>
<p>What is your ROE with them?</p>
<p>Now, what can you do today to make that ROE even better than yesterday?</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/05/what-is-your-roe/">What Is Your ROE?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8483"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=utyLo8Z8t7k:XPyV97Rnhok:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=utyLo8Z8t7k:XPyV97Rnhok:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=utyLo8Z8t7k:XPyV97Rnhok:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=utyLo8Z8t7k:XPyV97Rnhok:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=utyLo8Z8t7k:XPyV97Rnhok:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=utyLo8Z8t7k:XPyV97Rnhok:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/utyLo8Z8t7k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/05/what-is-your-roe/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/05/what-is-your-roe/</feedburner:origLink></item>
		<item>
		<title>Meme Monday for May</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/lShYbuq6bes/</link>
		<comments>http://thomaslarock.com/2012/05/meme-monday-for-may/#comments</comments>
		<pubDate>Sun, 06 May 2012 16:54:56 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Meme Monday]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8623</guid>
		<description><![CDATA[Tomorrow is the first Monday of the month, which means it is time for the latest installment of Meme Monday.
The rules of Meme Monday are simple: I give you a topic. You write about the topic. No need to link back, or tag anyone. It is a writing exercise only.
The topic for tomorrow is this: [...]<p><p></p>
<a href="http://thomaslarock.com/2012/05/meme-monday-for-may/">Meme Monday for May</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Tomorrow is the first Monday of the month, which means it is time for the latest installment of Meme Monday.</p>
<p>The rules of Meme Monday are simple: I give you a topic. You write about the topic. No need to link back, or tag anyone. It is a writing exercise only.</p>
<p>The topic for tomorrow is this: If you could go back in time and meet yourself on Day One of your IT career, what advice would you give?</p>
<p>In my case, I would go back, slap myself in the back of the head, and tell me to NOT send &#8220;those&#8221; emails.</p>
<p>You know the type of emails I am talking about. It is often much better to pick up a phone.</p>
<p>I look forward to reading your entries! Just post to twitter with the #mememonday hashtag and I can read them all.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/05/meme-monday-for-may/">Meme Monday for May</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8623"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lShYbuq6bes:kEIj8okP7cg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lShYbuq6bes:kEIj8okP7cg:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lShYbuq6bes:kEIj8okP7cg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lShYbuq6bes:kEIj8okP7cg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=lShYbuq6bes:kEIj8okP7cg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lShYbuq6bes:kEIj8okP7cg:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/lShYbuq6bes" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/05/meme-monday-for-may/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/05/meme-monday-for-may/</feedburner:origLink></item>
		<item>
		<title>Are You Using the Right SQL Server Performance Metrics?</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/Snf4I5nNRU0/</link>
		<comments>http://thomaslarock.com/2012/05/are-you-using-the-right-sql-server-performance-metrics/#comments</comments>
		<pubDate>Tue, 01 May 2012 18:27:08 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQL Server Performance]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[counters]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database administrator]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8587</guid>
		<description><![CDATA[No matter what our profession, we all have our favorite set of tools to help us get the job done.
Database Administrators will have a set of scripts that we use in order to gain insight into the server instances under our care. I often see beginner DBAs look to the counters provided by Perfmon (AKA, the Resource and Performance [...]<p><p></p>
<a href="http://thomaslarock.com/2012/05/are-you-using-the-right-sql-server-performance-metrics/">Are You Using the Right SQL Server Performance Metrics?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div id="attachment_8595" class="wp-caption alignleft" style="width: 293px"><a href="http://thomaslarock.com/2012/05/are-you-using-the-right-sql-server-performance-metrics/cockpit/" rel="attachment wp-att-8595"><img class="size-full wp-image-8595" title="cockpit" src="http://thomaslarock.com/wp-content/uploads/2012/05/cockpit.jpg?9d7bd4" alt="Which one of these orders more bacon?" width="283" height="424" /></a><p class="wp-caption-text">Which one of these orders more bacon?</p></div>
<p>No matter what our profession, we all have our favorite set of tools to help us get the job done.</p>
<p>Database Administrators will have a set of scripts that we use in order to gain insight into the server instances under our care. I often see beginner DBAs look to the counters provided by Perfmon (AKA, the <a href="http://technet.microsoft.com/en-us/library/cc771692(v=ws.10).aspx" target="_blank">Resource and Performance Monitor</a>). The trouble here is the counters themselves don&#8217;t necessarily give you enough details to make an informed decision about what actions you should take next. You need to look at a handful of the counters at any given time (or over a period of time) in order to better ascertain where the bottlenecks exist.</p>
<p>Here is a list of five metrics that I find myself frequently using when troubleshooting performance issues. They help me get insight quickly into some of the deep recesses of SQL Server so that I can easily corroborate with standard Perfmon counters in order to troubleshoot issues for customers. Ideally these are all being collected over a period of time so that you can do some proper trend analysis.</p>
<p>These are the metrics, in no particular order, that you should be using during the first few minutes of analysis. They will help you save time.</p>
<h3>1. Signal Waits Percentage</h3>
<p>This metric has provided the most value personally to me over the years. I started using it four years ago when troubleshooting CPU issues. The instance itself was showing signs of &#8220;slowness&#8221;, but the overall CPU utilization numbers were nominal. I came across <a href="http://msdn.microsoft.com/en-us/library/cc966413.aspx" target="_blank">this article by Tom Davidson</a> and found out that I could calculate the percentage of signal waits to the overall waits in order to understand internal CPU pressure exists. [A "signal" wait means that a session is in the "runnable" queue, waiting for a signal from an available processor.]
<p>I filter out some background tasks for this query as well. The value you want returned here is for no more than 20-25% of your total waits to be signal waits. If you are consistently seeing numbers greater than 20% then you are having internal CPU pressure. You can remedy the situation by reducing the number of sessions (not always likely), increasing the number of available CPUs (also not likely), or reducing the amount of time the queries need to execute (often very likely, and sometimes easily done).</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">SELECT (100.0 * SUM(signal_wait_time_ms)/SUM (wait_time_ms)) AS [SignalWaitPct]
FROM sys.dm_os_wait_stats
WHERE wait_type NOT IN (
'CLR_SEMAPHORE', 'LAZYWRITER_SLEEP', 'RESOURCE_QUEUE', 'SLEEP_TASK',
'SLEEP_SYSTEMTASK', 'SQLTRACE_BUFFER_FLUSH', 'WAITFOR', 'LOGMGR_QUEUE',
'CHECKPOINT_QUEUE', 'REQUEST_FOR_DEADLOCK_SEARCH', 'XE_TIMER_EVENT',
'BROKER_TO_FLUSH', 'BROKER_TASK_STOP', 'CLR_MANUAL_EVENT', 'CLR_AUTO_EVENT',
'DISPATCHER_QUEUE_SEMAPHORE', 'FT_IFTS_SCHEDULER_IDLE_WAIT',
'XE_DISPATCHER_WAIT', 'XE_DISPATCHER_JOIN', 'BROKER_EVENTHANDLER',
'TRACEWRITE', 'FT_IFTSHC_MUTEX', 'SQLTRACE_INCREMENTAL_FLUSH_SLEEP',
'BROKER_RECEIVE_WAITFOR', 'ONDEMAND_TASK_QUEUE', 'DBMIRROR_EVENTS_QUEUE',
'DBMIRRORING_CMD', 'BROKER_TRANSMITTER', 'SQLTRACE_WAIT_ENTRIES',
'SLEEP_BPOOL_FLUSH', 'SQLTRACE_LOCK')
AND wait_time_ms &lt;&gt; 0</pre></div></div>

<h3>2. SQL Compilation Percentage</h3>
<p>Another sneaky performance issue is having a high number of statements being compiled. There happens to be a performance counter for compiles but the counter itself does not have much meaning unless you also know the overall number of batch requests. Rather than look at either of those counters separately what you want to do is look at their ratio.</p>
<p>The recommended percentage for compilations is roughly 10% of the total number of batch requests. The following code will show you the current percentage of compilations to the number of batch requests:</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">SELECT 1.0*cntr_value /
(SELECT 1.0*cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Batch Requests/sec')
AS [SQLCompilationPct]
FROM sys.dm_os_performance_counters
WHERE counter_name = 'SQL Compilations/sec'</pre></div></div>

<p>At this point someone usually asks &#8220;what about re-compilations&#8221;? Well, re-compilations should only be roughly 1% of the total number of batch requests, so that code would be like this:</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">SELECT 1.0*cntr_value /
(SELECT 1.0*cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Batch Requests/sec')
AS [SQLReCompilationPct]
FROM sys.dm_os_performance_counters
WHERE counter_name = 'SQL Re-Compilations/sec'</pre></div></div>

<h3>3. Page Lookups Percentage</h3>
<p>What I like most about this metric is that it often gives me a hint regarding plan cache bloating without me having to dig through the plan cache itself. I also get insight on the queries hitting the instance, to see if they could use some tuning/indexing as there are likely some inefficient query plans being utilized.</p>
<p>What this metric really shows me is if I have one of two extremes. Either I have a few rather large queries hitting my server, or I have a lot of little queries (probably ad-hoc) hitting my instance and likely leading to some plan cache bloating.</p>
<p>What I want to see here is a value that is less than 100 on average:</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">SELECT 1.0*cntr_value /
(SELECT 1.0*cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Batch Requests/sec') 
AS [PageLookupPct]
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Page lookups/sec'</pre></div></div>

<h3>4. Average Task Counts</h3>
<p>I got <a title="Need a SQL diagnostic script? Click here!" href="http://sqlserverperformance.wordpress.com/2012/04/30/sql-server-2008-diagnostic-information-queries-may-2012/" target="_blank">this metric</a> from Glenn Berry (<a href="http://glennberrysqlperformance.spaces.live.com/default.aspx">blog</a> | <a href="http://twitter.com/GlennAlanBerry" target="_blank">@GlennAlanBerry</a>), and I use this one to determine what my system has been busy doing. I like how Glenn always has a brief description for what you want (or don&#8217;t want) to see. In this case it is as follows:</p>
<ul>
<li>Sustained values above 10 suggest further investigation in that area</li>
<li>High Avg Task Counts are often caused by blocking or other resource contention</li>
<li>High Avg Runnable Task Counts are a good sign of CPU pressure</li>
<li>High Avg Pending DiskIO Counts are a sign of disk pressure</li>
</ul>
<p>I can use this one in conjunction with others to get some corroborating evidence as to what is happening under the covers:</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">SELECT AVG(current_tasks_count) AS [Avg Task Count],
AVG(runnable_tasks_count) AS [Avg Runnable Task Count],
AVG(pending_disk_io_count) AS [Avg Pending DiskIO Count]
FROM sys.dm_os_schedulers WITH (NOLOCK)
WHERE scheduler_id &lt; 255 OPTION (RECOMPILE)</pre></div></div>

<h3>5. Buffer Pool I/O Rate</h3>
<p>The most misunderstood counter I see is Page Life Expectancy. I know I used to pay attention as if it meant something. Over time I have come to realize that it is a throwback to days of yore when <a href="http://sqlskills.com/blogs/jonathan/post/Finding-what-queries-in-the-plan-cache-use-a-specific-index.aspx" target="_blank">having 4GB of memory was a really big deal</a>. In other words, its intended purpose no longer has the same value as it once did. It is not totally worthless, however. You just need to know what to do with it.</p>
<p>What you really want to see is the rate at which your pages are being cycled through the buffer pool. The following code returns the &#8220;Buffer Pool Rate&#8221; in MB/sec. I usually look for rates around 20MB/sec as a baseline. Why that number? Because if I have a &#8220;typical&#8221; server with 56GB of RAM available for the buffer pool (thank you, locked pages in memory) and I want to keep my pages around for an hour or so (3600 seconds), then I come up with 56000MB/3600sec, or about 15.5 MB/sec. That&#8217;s why I look for a sustained rate of about 20 on average, and if I have a spike upward from there then I know I am having memory pressure (pressure that might otherwise fail to be seen if I only examine the PLE counter).</p>
<p>Here is the code I use:</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">SELECT (1.0*cntr_value/128) /
(SELECT 1.0*cntr_value
FROM sys.dm_os_performance_counters
WHERE object_name like '%Buffer Manager%'
AND lower(counter_name) = 'Page life expectancy')
AS [BufferPoolRate]
FROM sys.dm_os_performance_counters
WHERE object_name like '%Buffer Manager%'
AND counter_name = 'total pages'</pre></div></div>

<p>You should also be aware that if your server is NUMA aware then you will want to take that into consideration <a href="http://sqlskills.com/BLOGS/PAUL/post/Page-Life-Expectancy-isnt-what-you-think.aspx" target="_blank">whenever you try to use PLE as a performance metric</a>.</p>
<p>There you go, the five metrics I utilize for customers whenever they need my help in solving performance problems. I&#8217;m always looking to add to my toolbox, so if you have a favorite metric you want to share just leave it in the comments below.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/05/are-you-using-the-right-sql-server-performance-metrics/">Are You Using the Right SQL Server Performance Metrics?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8587"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=Snf4I5nNRU0:kYaCiV8yfj8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=Snf4I5nNRU0:kYaCiV8yfj8:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=Snf4I5nNRU0:kYaCiV8yfj8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=Snf4I5nNRU0:kYaCiV8yfj8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=Snf4I5nNRU0:kYaCiV8yfj8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=Snf4I5nNRU0:kYaCiV8yfj8:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/Snf4I5nNRU0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/05/are-you-using-the-right-sql-server-performance-metrics/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/05/are-you-using-the-right-sql-server-performance-metrics/</feedburner:origLink></item>
		<item>
		<title>6 Little Known Things That Can Cause Big Performance Issues</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/lFz6qo3XL-o/</link>
		<comments>http://thomaslarock.com/2012/04/6-little-known-thing-that-can-cause-big-performance-issues/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 12:37:38 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Database Design]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQL Server Performance]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[reporting]]></category>
		<category><![CDATA[savings]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8533</guid>
		<description><![CDATA[As a system admin, DBA, or a developer it is our job to root out performance problems quickly. The trouble is that there are so many things that can cause performance issues it can be difficult to know every possible root cause. This is especially true when the root cause lies somewhere outside your area [...]<p><p></p>
<a href="http://thomaslarock.com/2012/04/6-little-known-thing-that-can-cause-big-performance-issues/">6 Little Known Things That Can Cause Big Performance Issues</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://thomaslarock.com/2012/04/6-little-known-thing-that-can-cause-big-performance-issues/db_down/" rel="attachment wp-att-8570"><img class="alignleft  wp-image-8570" title="Ever have that sinking feeling?" src="http://thomaslarock.com/wp-content/uploads/2012/04/db_down.jpg?9d7bd4" alt="Ever have that sinking feeling?" width="314" height="244" /></a>As a system admin, DBA, or a developer it is our job to root out performance problems quickly. The trouble is that there are so many things that can cause performance issues it can be difficult to know every possible root cause. This is especially true when the root cause lies somewhere outside your area of expertise or control.</p>
<p>It is also true when the root cause is right under our noses the whole time.</p>
<p>Here are six things that I have seen cause performance issues for end users. None of them are complex by nature. Each is something that is simple and easily addressed when they are known.</p>
<p>So that&#8217;s why I wrote this post, in an effort to get these into the mainstream. If you are not taking steps to to mitigate these possible performance issues, start now. If you find yourself one day sitting at your screen and scratching your head wondering &#8220;what&#8217;s wrong&#8221;, then take a chance that one of these six things could be the culprit.</p>
<h3>1. Configure your memory settings</h3>
<p>I see this scenario all the time: Customer notices they are low on memory. They call me. I ask if they have configure the max memory setting to a non-default value. They say no.</p>
<p>Lather, rinse, repeat. I used to count the number of times this would happen to me but I stopped after the first hundred or so. It is one of the reasons I put together a talk on SQL Server memory management last year, because it just seemed to be the easiest thing for people to be doing <em>and yet they weren&#8217;t doing it</em>.</p>
<p>I <a href="http://thomaslarock.com/2011/03/misremembering-memory-settings/" target="_blank">wrote a post a while back</a> to help explain this fact as well. And then <a href="http://sqlserverperformance.wordpress.com/2009/10/29/suggested-max-memory-settings-for-sql-server-20052008/" target="_blank">there is this post</a> by Glenn Berry (<a href="http://glennberrysqlperformance.spaces.live.com/default.aspx">blog</a> | <a href="http://twitter.com/GlennAlanBerry" target="_blank">@GlennAlanBerry</a>) and <a href="http://sqlskills.com/blogs/jonathan/post/How-much-memory-does-my-SQL-Server-actually-need.aspx" target="_blank">one done by</a> Jonathan Kehayias (<a href="http://sqlskills.com/blogs/jonathan/" target="_blank">blog</a> | <a href="http://twitter.com/SQLPoolboy">@SQLPoolboy</a>), and yet still people don&#8217;t know to configure these settings. Take the few minutes you need to adjust your settings and you will reduce the chances of having performance problems due to memory settings.</p>
<h3>2. Optimize tempdb</h3>
<p>This one is often overlooked as most folks wait around for a problem with tempdb before thinking about how best to optimize it for performance right from the start. This <a href="http://sqlcat.com/sqlcat/b/top10lists/archive/2007/11/21/storage-top-10-best-practices.aspx" target="_blank">SQLCAT link</a> mentions this as well, and there is <a href="http://msdn.microsoft.com/en-us/library/ms175527.aspx" target="_blank">info over at MSDN that you should review</a> before making changes. And yes, you <em>should</em> consider moving tempdb to it’s own dedicated set of drives.</p>
<p>In fact, I would tell you that the placing of data files, log files, backup files, and tempdb onto separate disks <strong>should</strong> be a part of any standard database server build. I emphasize the ‘should’ because for some odd reason I still see shops where this is not true. If that is the case for you, and you need to boost performance, then roll up your sleeves and get started on the work that should have been done from the onset.</p>
<h3>3. Increase transaction log throughput</h3>
<p>Another area that will affect your database performance has to do with the configuration of your transaction logs. Kimberly Tripp (<a href="http://www.sqlskills.com/blogs/kimberly/">blog</a> | <a href="http://twitter.com/KimberlyLTripp">@KimberlyLTripp</a>) has a great post on the <a href="http://sqlskills.com/blogs/kimberly/post/8-steps-to-better-transaction-log-throughput.aspx" target="_blank">8 Steps to Better Transaction Log Throughput</a>. Many folks don&#8217;t think about how something as simple as managing log file growth properly can help with overall performance.</p>
<p>One of the hidden parts of transaction logs has to do with virtual log files (VLFs), the &#8220;chunks&#8221; that are strung together to form the transaction log. I wrote about VLFs a while back when I witnessed firsthand the havoc they could cause. Until I knew about VLFs I had no idea <a href="http://sqlskills.com/BLOGS/KIMBERLY/post/Transaction-Log-VLFs-too-many-or-too-few.aspx" target="_blank">why my log files were &#8220;misbehaving&#8221;</a>. After I found out about them I decided to come up with a way to identify databases that had too many VLFs and were causing us issues (both for performance and administrative activities) and took the necessary corrective actions. Those actions also led to a review of overall transaction log throughput, as I wanted to make certain we were deploying servers to our end users that were configured for performance right from the start because it is a real pain to go back after the fact and say things like &#8220;Oh, sorry, I didn&#8217;t realize you wanted that server to perform well, so we just gave you all the default stuff which is usually crappy, we can go back and fix all of that for you and have things ready in about two months.&#8221;</p>
<p>Save yourself that headache. Take care of your transaction logs from the start. You can thank me later.</p>
<h3>4. Build a proper reporting database</h3>
<p>I see a lot of &#8220;mixed-use&#8221; databases in every type of industry. At some point someone gets the idea that they need a database in order to store information, usually customer information at first, then things like products, inventory, or sales. You know, standard business stuff. Most of those systems are built along guidelines for typical transactional based processing. After some time, perhaps months or years, other people in the office think to themselves &#8220;hey, I need some info, and don&#8217;t we have it already in that database&#8221;? So they go about building some reports.</p>
<p>And before you can say &#8220;writers block readers&#8221; you soon have yourself an OLTP system that is being used more often for OLAP purposes. I used to have a job that would alert me whenever a spid was blocked for 300 seconds. That&#8217;s five minutes. Of doing nothing but waiting for someone else. When I would call the person and tell them something like &#8220;hey, you stuff is blocked and just sitting there, and it is Joe doing the blocking&#8221; I would get responses that would range from &#8220;OK, his stuff needs to run, so I can wait&#8221; to &#8220;OMG WTF IS JOE DOING IN MY DATABASE RIGHT NOW WHILE I AM TRYING TO FINISH MY WORK!&#8221;</p>
<p>Building a proper reporting solution can help you improve performance for everyone, and it is often never talked about. Usually people focus on trying to coexist when they should really talk about signing the divorce papers.</p>
<h3>5. Choosing the correct datatypes</h3>
<p>More often than not, database performance (good and bad) can be traced all the way back to the design phase. During that phase there is (or, there <em>should</em>) be a discussion around the choice of proper data types for the underlying data. Unfortunately I see that such discussions typically don&#8217;t happen, thanks to tools like Visual Studio that will create tables with columns that are nvarchar(50) by default.</p>
<p>Most of the time I try to talk to customer about the selection of data types and the impact on performance I get back one of two responses: &#8220;I didn&#8217;t know that&#8221; or &#8220;It&#8217;s vendor code, we can&#8217;t touch it&#8221;.  Clearly we need to raise awareness in either case. Also, we need to stop blaming the database for the problems that have been created at design time. The database is only doing what you have asked, and you have likely asked it to work inefficiently and slowly. Check out <a href="http://www.databasejournal.com/features/mssql/article.php/3718066/Disk-Space-Usage-and-SQL-Server-Performance.htm" target="_blank">this article by Greg Larsen</a> regarding performance and data types. And here is a list of <a href="http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/12/bad-habits-to-kick-using-the-wrong-data-type.aspx" target="_blank">bad habits to kick</a> by Aaron Bertrand (<a href="http://sqlblog.com/blogs/aaron_bertrand/">blog</a> | <a href="http://twitter.com/aaronbertrand" target="_blank">@aaronbertrand</a>).</p>
<h3>6. Configure Your Power Settings</h3>
<p>I know that &#8220;being green&#8221; is all in vogue these days. As a result we have things like <a href="http://blogs.msdn.com/b/cindygross/archive/2011/03/09/power-saving-options-on-sql-server.aspx" target="_blank">power savings options</a> for servers that allow for the CPU to be throttled when not in use. The net result of this is that you get the chance to explain to your end users that while <a href="http://sqlserverperformance.wordpress.com/2011/01/18/another-example-of-cpu-throttling-due-to-balanced-power-plan-in-windows-server-2008-r2/" target="_blank">database performance is not very good</a> they can feel better knowing that they are helping to keep polar bears colder at night. Then again, you can only make such a comment to them if you are aware about these power savings options. Since most people have no idea about these power settings they are likely to spend many fruitless hours trying to track down the root cause of performance issues. In an incredible twist of irony, the extra power they consume while trying to research the issue brought about by <em>power saving</em> results in those polar bears needing more and more suntan lotion with each passing year.</p>
<p>The above six items are all ways that you could be suffering from poor database performance. The problem I see with many DBAs is that they try to fix the <em>one thing</em> that is on their plate at the moment, without seeing a bigger picture. Similar to saying &#8220;you can&#8217;t see the forest through the trees&#8221;, many DBAs are so focused on getting one query at a time tuned that they never bother to look up and see things like memory settings, or transaction log configurations, or optimizing tempdb for performance as ways to improve performance. Rarely will I ever see a discussion about changing data types or building a proper report solution and yet those are also ways your performance could be slowly draining away.</p>
<p>These are all items that can be addressed early on in any project, or even a rollout of a new instance of SQL Server. It doesn&#8217;t take much time and the benefits are worth every minute.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/04/6-little-known-thing-that-can-cause-big-performance-issues/">6 Little Known Things That Can Cause Big Performance Issues</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8533"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lFz6qo3XL-o:JsmXyTCVtPI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lFz6qo3XL-o:JsmXyTCVtPI:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lFz6qo3XL-o:JsmXyTCVtPI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lFz6qo3XL-o:JsmXyTCVtPI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=lFz6qo3XL-o:JsmXyTCVtPI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=lFz6qo3XL-o:JsmXyTCVtPI:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/lFz6qo3XL-o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/04/6-little-known-thing-that-can-cause-big-performance-issues/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/04/6-little-known-thing-that-can-cause-big-performance-issues/</feedburner:origLink></item>
		<item>
		<title>Less Is More, Even With Databases</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/8Zv-7Lg6XFA/</link>
		<comments>http://thomaslarock.com/2012/04/less-is-more-even-with-databases/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 19:08:49 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8545</guid>
		<description><![CDATA[I&#8217;ve been writing (and blogging) for about ten years now. I&#8217;ve written lots of things over the years and I have learned how much better my writing becomes when I remove words upon editing. So much improvement can be found that I often feel it might have been best to have not written anything at [...]<p><p></p>
<a href="http://thomaslarock.com/2012/04/less-is-more-even-with-databases/">Less Is More, Even With Databases</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://thomaslarock.com/2012/04/less-is-more-even-with-databases/little_prince/" rel="attachment wp-att-8549"><img class="alignleft size-medium wp-image-8549" title="Likely working on a database design, I'm certain." src="http://thomaslarock.com/wp-content/uploads/2012/04/little_prince-289x300.jpg?9d7bd4" alt="Likely working on a database design, I'm certain." width="289" height="300" /></a>I&#8217;ve been writing (and blogging) for about ten years now. I&#8217;ve written lots of things over the years and I have learned how much better my writing becomes when I remove words upon editing. So much improvement can be found that I often feel it might have been best to have not written anything at all in the first place.</p>
<p>Over the weekend I came across a quote that gave me pause. It is attributed to <a href="http://www.antoinedesaintexupery.com/" target="_blank">Antoine de Saint-Exupéry</a>, and has to do with writing as well:</p>
<p>&#8220;<strong><em>Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away</em></strong>.&#8221;</p>
<p>After reading that quote I started to think about data. I often see people trying to cram more data &#8220;just in case&#8221; in might be needed later. I will also find databases that are so badly abused that entire teams of people agree that &#8220;a re-write is needed&#8221;. They will discuss at great length what to do about sunsetting one system as they build another system with EVEN MORE crap than what the first one had. It can be surreal to experience, too. Some people are so attached to the old system you would think it was a family member or pet. They fight to keep someone from pulling the plug while others talk about what snacks they need to order for the wake.</p>
<p>Before you go about trying to shove more things into a perfectly good database do yourself a favor: stop and think. Are you shoving those extra columns onto that table so you can run a new report? Consider the benefits if you have your own reporting database, maybe even your own cube, before you consider just blindly shoving more and more stuff into the current system. Many times I see this as a result of &#8220;scope creep&#8221;, which is like the herpes of any good database design project&#8230;you know it&#8217;s there, you put some ointment on it, and the blemish goes away for a while but it never <em>really</em> goes away, the bad stuff is still with you, just lurking under the surface.</p>
<p>Think more about what you can take away from your current systems.</p>
<p>Think how much better things would be if you could separate out the transaction parts of your system from the reporting components.</p>
<p>Think about how much better things might be <em>with less</em>, and not with more.</p>
<p>&#8220;<em><strong>Il semble que la perfection soit atteinte non quand il n&#8217;y a plus rien à ajouter, mais quand il n&#8217;y a plus rien à retrancher</strong>.&#8221;</em></p>
<p><p></p>
<a href="http://thomaslarock.com/2012/04/less-is-more-even-with-databases/">Less Is More, Even With Databases</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8545"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=8Zv-7Lg6XFA:JQMxH4A5yRo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=8Zv-7Lg6XFA:JQMxH4A5yRo:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=8Zv-7Lg6XFA:JQMxH4A5yRo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=8Zv-7Lg6XFA:JQMxH4A5yRo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=8Zv-7Lg6XFA:JQMxH4A5yRo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=8Zv-7Lg6XFA:JQMxH4A5yRo:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/8Zv-7Lg6XFA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/04/less-is-more-even-with-databases/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/04/less-is-more-even-with-databases/</feedburner:origLink></item>
		<item>
		<title>Why the 127 Diagrams?</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/2b-NSGbvkSg/</link>
		<comments>http://thomaslarock.com/2012/04/why-the-127-diagrams/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 18:33:53 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Database Design]]></category>
		<category><![CDATA[Musings]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8521</guid>
		<description><![CDATA[Yesterday I showed you some real world SQL joins and their associated diagrams. I also left as an exercise for the reader this question regarding a standard three table join:
&#8220;explain why I could need 127 different diagrams&#8221;
I had a few people guess the answer on Twitter and G+ as well as some emails. So I [...]<p><p></p>
<a href="http://thomaslarock.com/2012/04/why-the-127-diagrams/">Why the 127 Diagrams?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Yesterday I showed you some <a title="Real World SQL Join Examples" href="http://thomaslarock.com/2012/04/real-world-sql-join-examples/" target="_blank">real world SQL joins</a> and their associated diagrams. I also left as an exercise for the reader this question regarding a standard three table join:</p>
<p>&#8220;<em>explain why I could need 127 different diagrams</em>&#8221;</p>
<p>I had a few people guess the answer on Twitter and G+ as well as some emails. So I decided to post the answer here today in case you wanted to understand it a bit more.</p>
<p>Let&#8217;s consider the seven regions that we have in the following diagram: <a href="http://thomaslarock.com/2012/04/why-the-127-diagrams/attachment/127/" rel="attachment wp-att-8522"><img class="alignleft size-full wp-image-8522" title="127" src="http://thomaslarock.com/wp-content/uploads/2012/04/127.png?9d7bd4" alt="" width="792" height="604" /></a></p>
<p>Now, consider the fact that no matter what type of join we want to execute (INNER, CROSS, LEFT, RIGHT, FULL OUTER) the end result is that we are either going to return data from one of those seven regions or not return data. In my diagram the green shaded regions represent areas for which we will return data and white is for regions where no data is returned.</p>
<p>In a nutshell: they are bits. On or off.</p>
<p>Most people still stumble at what needs to be done next, so I offer them a more familiar example. Consider you have a coin to flip, and also consider that after each flip we will either have a heads or a tails (yes, we will leave out the other possibilities such as landing on an edge, or disappearing into a wormhole, or having it swallowed by a marmot). If I flip that coin three times then this becomes the entire list of possible outcomes (H = result of flip is heads, T = results of flip is tails):</p>
<p>HHH<br />
HHT<br />
HTH<br />
HTT<br />
THH<br />
THT<br />
TTH<br />
TTT</p>
<p>Eight possible outcomes, right? Most people see this example and say &#8220;yeah, I know that, but how does that help me with the above diagram?&#8221;</p>
<p>It is because each region in the diagram is just like a coin flip. Either we are getting data or not. Having seven regions is like having seven coin flips.</p>
<p>When I flip a coin three times I end up with 2^3 = 8 possible outcomes.</p>
<p>When I flip a coin seven times I end up with 2^7 = 128 possible outcomes. But one of those outcomes would be for when all regions are not selected, which is a fairly trivial example that we wouldn&#8217;t put on a diagram, so we are left with 127 total diagrams that we would need to draw.</p>
<p>That being said, many of the diagrams are repeats of each other. The join syntax for returning one table and the intersection of two other tables is the same; we just swap A with B with C and we can consolidate the need for a lot of the 127 diagrams.</p>
<p>But it was still far too many diagrams for me to think about wanting to draw and show the syntax for. Also: it isn&#8217;t practical, because the examples I gave yesterday are what we see in reality. Who wants to see textbook examples of joins anyway?</p>
<p>Just old math geeks like myself, I suppose.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/04/why-the-127-diagrams/">Why the 127 Diagrams?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8521"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=2b-NSGbvkSg:eQvZl9deYP8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=2b-NSGbvkSg:eQvZl9deYP8:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=2b-NSGbvkSg:eQvZl9deYP8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=2b-NSGbvkSg:eQvZl9deYP8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=2b-NSGbvkSg:eQvZl9deYP8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=2b-NSGbvkSg:eQvZl9deYP8:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/2b-NSGbvkSg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/04/why-the-127-diagrams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/04/why-the-127-diagrams/</feedburner:origLink></item>
		<item>
		<title>Real World SQL Join Examples</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/KsPW2E1Fn4I/</link>
		<comments>http://thomaslarock.com/2012/04/real-world-sql-join-examples/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 18:54:12 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Database Design]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[big data]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Diagram]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8480</guid>
		<description><![CDATA[I found a diagram recently that helped to explain the different types of JOIN syntax. Being the type person that enjoys the visualization of abstract concepts such as set theory this diagram spoke to me. Despite the diagram being well done something seemed slightly wrong about it. I thought about it for a while and then it [...]<p><p></p>
<a href="http://thomaslarock.com/2012/04/real-world-sql-join-examples/">Real World SQL Join Examples</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I found a diagram recently that <a href="http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins" target="_blank">helped to explain the different types of JOIN syntax</a>. Being the type person that enjoys the visualization of abstract concepts such as set theory this diagram spoke to me. Despite the diagram being well done something seemed slightly wrong about it. I thought about it for a while and then it hit me: the diagram does not accurately reflect the complexity of joins for queries I see every day. The diagram seems better suited for a classroom, not the real world. So I decided to put together my own diagrams for you to show you the things I see frequently. You&#8217;re welcome.</p>
<h3>1. The Three Table Join</h3>
<p>This first diagram that I thought about was a simple three table join. In fact, I was going to put together a new diagram for all the possible three table joins but decided that I really did not have the desire to put together 127 different diagrams (I am leaving it as an exercise for the reader to explain why I could need 127 different diagrams, leave your answer in the comments below). So, here is the first type of join I thought about:</p>
<p><a href="http://thomaslarock.com/2012/04/real-world-sql-join-examples/joins-3/" rel="attachment wp-att-8490"><img class="alignleft size-full wp-image-8490" title="joins-3" src="http://thomaslarock.com/wp-content/uploads/2012/04/joins-3.png?9d7bd4" alt="" width="737" height="635" /></a></p>
<p>What I find worth mentioning here is that you can change your result set by altering that second join. Instead of A.c1 = C.c1, change it to B.c1 = C.c1 and you will find that you may not return the expected data in your select list (another exercise for the reader there, go ahead and try that for yourself <a href="http://thomaslarock.com/wp-content/uploads/2012/04/join.txt" target="blank">or you can just download this quick sample script</a>).</p>
<p>Another fascinating point here is that it occurred to me that this same T-SQL would also apply to the following:<a href="http://thomaslarock.com/2012/04/real-world-sql-join-examples/joins-3-gap/" rel="attachment wp-att-8488"><img class="alignleft size-full wp-image-8488" title="joins-3-gap" src="http://thomaslarock.com/wp-content/uploads/2012/04/joins-3-gap.png?9d7bd4" alt="" width="737" height="635" /></a></p>
<p>This diagram seems slightly more realistic to me, as I am likely to start with one table and need to go out to two (or more) other tables with joins.</p>
<h3>2. The Table Join For Disjointed Tables</h3>
<p>That idea got me thinking even more (always a dangerous thing) and I then thought about other types of joins I see frequently:<a href="http://thomaslarock.com/2012/04/real-world-sql-join-examples/joins-4/" rel="attachment wp-att-8489"><img class="alignleft size-full wp-image-8489" title="joins-4" src="http://thomaslarock.com/wp-content/uploads/2012/04/joins-4.png?9d7bd4" alt="" width="737" height="635" /></a></p>
<p>Yeah, that&#8217;s right&#8230;multiple tables with no relation between them. The end user just selects everything possible and then filters the rows based upon the WHERE clause or uses features in Excel or PowerPivot to do the filtering. In a way this is what I visualize &#8220;Big Data&#8221; to be, the grabbing of as much data as possible, mashing it together, and filtering the results until you find something that helps you get one step closer to wherever it is you wanted to go today.</p>
<h3>3. The One Big Table Join</h3>
<p>After that graph it suddenly occurred to me that there are a lot of people who create OLTP databases with really wide tables. I mean, REALLY wide tables, hundreds of columns. So, their syntax and graph looks like this: <a href="http://thomaslarock.com/2012/04/real-world-sql-join-examples/joins-1/" rel="attachment wp-att-8487"><img class="alignleft size-full wp-image-8487" title="joins-1" src="http://thomaslarock.com/wp-content/uploads/2012/04/joins-1.png?9d7bd4" alt="" width="737" height="635" /></a></p>
<p>Everything in one table, what a perfect database design, right? What could be simpler than that? In fact most data warehouses are built this way, where they have a few tables that are really wide and you may not need to join to any other tables. All the more reason to point out how the original diagram was not very indicative of the queries I see. In fact, the last picture I have for you is the EXACT type of query I see all the time.</p>
<h3>4. The &#8220;What Were They Thinking&#8221; Table Join</h3>
<p>How many times have you seen code similar to the following? Ever try to draw the picture? Here is my visualization: <a href="http://thomaslarock.com/2012/04/real-world-sql-join-examples/joins-14/" rel="attachment wp-att-8486"><img class="alignleft size-full wp-image-8486" title="joins-14" src="http://thomaslarock.com/wp-content/uploads/2012/04/joins-14.png?9d7bd4" alt="" width="941" height="640" /></a></p>
<p>Yes, that&#8217;s right, I <em>did</em> include the infamous =&#8217;NULL&#8217;, don&#8217;t pretend like you haven&#8217;t seen that one before! I also included column names of &#8216;pid&#8217; and &#8216;p_id&#8217; to give you an indication about how we often see column names that aren&#8217;t very descriptive and leave you wondering if the columns are truly representing the same value type.</p>
<p>I think the above five diagrams are a lot closer in reality to the types of queries we see every day. And the types of queries we are expected to tune, often immediately.</p>
<p>I often find it easier to help with performance problems once I am able to visualize what the joins are representing. I bet your end users would appreciate seeing similar diagrams as well, it may help them to understand what they are asking for, and it would likely help lead to a healthy discussion about design considerations. If nothing else, it should help to level set the expectations for performance.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/04/real-world-sql-join-examples/">Real World SQL Join Examples</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8480"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=KsPW2E1Fn4I:ZFeYPOPUcaU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=KsPW2E1Fn4I:ZFeYPOPUcaU:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=KsPW2E1Fn4I:ZFeYPOPUcaU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=KsPW2E1Fn4I:ZFeYPOPUcaU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=KsPW2E1Fn4I:ZFeYPOPUcaU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=KsPW2E1Fn4I:ZFeYPOPUcaU:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/KsPW2E1Fn4I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/04/real-world-sql-join-examples/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/04/real-world-sql-join-examples/</feedburner:origLink></item>
		<item>
		<title>Expert Query Performance Troubleshooting</title>
		<link>http://feedproxy.google.com/~r/SQLRockstar/~3/mjUbdKmCcZM/</link>
		<comments>http://thomaslarock.com/2012/04/expert-query-performance-troubleshooting/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 17:05:48 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQL Server Performance]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[optimizer]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[SQL Server 2012]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=8466</guid>
		<description><![CDATA[This video is an hour-long but well worth sharing with you today. One of the main takeaways from this video I want you to have is the fact that troubleshooting performance is not always rocket surgery. When you watch this video and listen to Conor Cunningham talk about some of the real world examples he [...]<p><p></p>
<a href="http://thomaslarock.com/2012/04/expert-query-performance-troubleshooting/">Expert Query Performance Troubleshooting</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This video is an hour-long but well worth sharing with you today. One of the main takeaways from this video I want you to have is the fact that troubleshooting performance is not always rocket surgery. When you watch this video and listen to Conor Cunningham talk about some of the real world examples he has faced you will see what I mean.</p>
<p>I also liked how they help you to understand the concept of how to &#8220;bucketize&#8221; performance issues. It goes something like this:</p>
<p><em>Are <strong><span style="text-decoration: underline;">all</span></strong> queries affected, or just a <span style="text-decoration: underline;"><strong>subset</strong></span> of queries affected?</em></p>
<p>If all queries are having performance issues then you will want to examine settings that affect the entire instance, such as memory settings, or high CPU utilization. You will want to do this first before trying to examine any one particular query.</p>
<p>If it is only a subset of queries (or users, or a particular application) then you will want to focus your efforts on those queries first. Otherwise you will be wasting time trying to fix one query without addressing the root cause of the performance issue affecting all queries. [A great example of this for my customers has to do with virtualization: why waste time trying to tune one query when the reason for the slowness is because your memory settings have been dynamically changed? Better to spend five minutes talking to your server admins about the memory for your guest than to waste time trying to get a query to suddenly run faster with less memory available.]
<p>Just being able to diagnose &#8220;all versus some&#8221; in the first five minutes of triage in a production down situation can save you a lot of time as you begin to form your action plan to correct problem and bring performance back to within acceptable limits. Set aside some time this week to watch this video and learn more.</p>
<p><iframe title="YouTube video player" width="570" height="315" src="http://www.youtube.com/embed/Nbxg5crWq38" frameborder="0" allowfullscreen></iframe><div id="tentblogger-vimeo-youtube-message" style="width: 100%; border: 1px solid #e6e6e6; background: #f8f8f4; text-align:center; padding: 0.25em; ">Can't see the video in your RSS reader or email? <a target="_blank" href="http://thomaslarock.com/2012/04/expert-query-performance-troubleshooting/">Click Here!</a></div></p>
<p><p></p>
<a href="http://thomaslarock.com/2012/04/expert-query-performance-troubleshooting/">Expert Query Performance Troubleshooting</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
</p>
<div class="shr-publisher-8466"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=mjUbdKmCcZM:tfR4rzDw8N8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=mjUbdKmCcZM:tfR4rzDw8N8:Tlc60a-_mp0"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=Tlc60a-_mp0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=mjUbdKmCcZM:tfR4rzDw8N8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=mjUbdKmCcZM:tfR4rzDw8N8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?i=mjUbdKmCcZM:tfR4rzDw8N8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SQLRockstar?a=mjUbdKmCcZM:tfR4rzDw8N8:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/SQLRockstar?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SQLRockstar/~4/mjUbdKmCcZM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/04/expert-query-performance-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thomaslarock.com/2012/04/expert-query-performance-troubleshooting/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic
Database Caching 23/63 queries in 0.038 seconds using disk: basic
Object Caching 2044/2152 objects using disk: basic

Served from: thomaslarock.com @ 2012-05-16 10:26:59 -->

