<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Buck Woody : SQL Server 2008, Development</title><link>http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server+2008/Development/default.aspx</link><description>Tags: SQL Server 2008, Development</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Know Your Product Specifications</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/01/13/know-your-product-specifications.aspx</link><pubDate>Wed, 13 Jan 2010 14:57:01 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:21010</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/21010.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=21010</wfw:commentRss><description>&lt;p&gt;As the Data Professional in your organization, the rest of the org looks to you to ensure that the system can handle what the business requires. To do that, you need to know two things: what the business requires, and what SQL Server can do.&lt;/p&gt;  &lt;p&gt;But of course there’s a bit more to it than that. Knowing the business side of the requirements – well, I teach an entire course on that. But knowing what SQL Server can do is something you can find out on your own.&lt;/p&gt;  &lt;p&gt;SQL Server comes in &lt;em&gt;versions&lt;/em&gt;, which are released based on date, and &lt;em&gt;editions&lt;/em&gt;, which are based on features and capabilities. It’s that last part that I want to focus on today.&lt;/p&gt;  &lt;p&gt;As Microsoft SQL Server matures, you’re going to see even more separation between what each edition of SQL Server can do and where it should be used. In the past, most folks have only focused on three editions – Express (the “free” one), Standard, and Enterprise. The rule of thumb was that if Standard was good enough at the moment, put it in. And it is true (and a good thing) that you can upgrade from one edition to another fairly easily.&lt;/p&gt;  &lt;p&gt;But as time goes on, we should spend a little more time understanding what each edition does, what it’s features and capabilities are, and where and when we should put them in. As I study this information, I’ll throw in my 2 cents and you can as well based on what you see. One thing I’ve found so far is that once I have the business requirements, there’s a mix of what I can write in code and what might already be included in a different edition. It’s important to look long and hard at that choice – writing a feature on my own is certainly cheaper in the short term than moving to a “higher” edition, but in some cases it makes sense to let Microsoft handle that lifting.&lt;/p&gt;  &lt;p&gt;These links are ones that you should bookmark and take a peek at periodically. They are the “header” links for more information on those features and capabilities:&lt;/p&gt;  &lt;p&gt;SQL Server 2008: &lt;a href="http://msdn.microsoft.com/en-us/library/ms143287.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms143287.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;SQL Server 2008 R2: &lt;a href="http://msdn.microsoft.com/en-us/library/ms143287(SQL.105).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms143287(SQL.105).aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In addition, you might start learning a little more about SQL Azure. I’ll talk more about that later.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=21010" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Career/default.aspx">Career</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Planning/default.aspx">Planning</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Microsoft+Update/default.aspx">Microsoft Update</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Link+Lists/default.aspx">Link Lists</category></item><item><title>After the Upgrade, it runs differently…</title><link>http://sqlblog.com/blogs/buck_woody/archive/2009/12/01/after-the-upgrade-it-runs-differently.aspx</link><pubDate>Tue, 01 Dec 2009 16:06:55 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:19385</guid><dc:creator>BuckWoody</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/19385.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=19385</wfw:commentRss><description>&lt;p&gt;I got a question yesterday in the mail that I thought I would just answer here in a broad context. While I can’t troubleshoot or do performance tuning from a distance, there are some interesting concepts and suggestions this e-mail brings up:&lt;/p&gt;  &lt;p&gt;&lt;font color="#800000" size="1"&gt;“I have recently seen a change from SQL Server from 2005 to 2008 in where it handles CASE statements differently. Previously we saw a tremendous improvement in performance by using CASE statements instead of OR statements. However when one of our client upgraded to 2008 they began to notice unusually long runtimes with a few of these queries (orders of magnitude larger runtimes). Swapping it to an OR statement allows it to run in 0.075 seconds... so my question to you is do you know of any changes to the exectution engine that would account for this and what is your recommendation?”&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;It’s a great question. Basically it boils down to “I changed versions, now something acts differently.” Before we talk about what might be the issue, let’s talk about some things you should do after you upgrade from one version of SQL Server to another.&lt;/p&gt;  &lt;p&gt;First, open the database properties and change the compatibility level to 10.0, unless you know you shouldn’t. Next, update your statistics – all of them. Third, ensure you have all of the proper service packs applied to the operating system and SQL Server. And finally, check the code you have for deprecated statements, or for places where you could optimize the code to use new statements or formats. There are other steps to follow, but these basics will help.&lt;/p&gt;  &lt;p&gt;Now, with all of that done, let’s move on to things that work differently. First, you need to find out what the&amp;#160; code is doing – and the primary way to do that is to examine the Query Execution Plan. There are a lot of resources to teach you how to do that, but the general idea is that you turn that plan on (in the Query menu), run the query, look at the graphical plan and check three items: the overall plan, the icons that show the highest percentage of use, and the thickest arrows. Evaluating this on the “before” system and the “after” system, and that will show you what changed.&lt;/p&gt;  &lt;p&gt;Maybe.&lt;/p&gt;  &lt;p&gt;The point is, the query might take exactly the same path, but a different component may show stress because you might have a different box or configuration. Perhaps the drive layouts changed (or should), you have more memory (or better access to it) and so on. In that case, you simply follow standard performance tuning methodologies to locate what’s waiting, and what is showing pressure.&lt;/p&gt;  &lt;p&gt;Now to the question at hand – does SQL Server (any version) handle a CASE statement differently than an OR statement? Well, once again, the execution plan will show you that answer, but the CASE statement is used for a different purpose than an OR statement – without having all of the code it’s difficult to say which to use in a given situation. The best thing to do is to evaluate the documentation on each and decide which fits the situation best.&lt;/p&gt;  &lt;p&gt;CASE: &lt;a title="http://msdn.microsoft.com/en-us/library/ms181765.aspx" href="http://msdn.microsoft.com/en-us/library/ms181765.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms181765.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;OR: &lt;a title="http://msdn.microsoft.com/en-us/library/ms188361.aspx" href="http://msdn.microsoft.com/en-us/library/ms188361.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms188361.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Did we make changes to CASE or OR? Not directly – but each change to the product may have orthogonal implications, which is where I point you back to the steps I mentioned for the “after upgrade” process.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=19385" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx">Testing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Performance+Tuning/default.aspx">Performance Tuning</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Latest+Version/default.aspx">Latest Version</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Documentation/default.aspx">Documentation</category></item></channel></rss>