{"id":623,"date":"2006-07-11T03:27:35","date_gmt":"2006-07-11T03:27:35","guid":{"rendered":"\/blogs\/kimberly\/post\/Designing-for-Performance-opinions-tips-tricks-techniques!.aspx"},"modified":"2013-01-02T06:58:13","modified_gmt":"2013-01-02T14:58:13","slug":"designing-for-performance-opinions-tips-tricks-techniques","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/designing-for-performance-opinions-tips-tricks-techniques\/","title":{"rendered":"Designing for Performance &#8211; opinions, tips, tricks, techniques?!"},"content":{"rendered":"<p><P>Been thinking a lot about something that was mentioned in a few of my most recent posts&#8230; Especially when I get comments like &#8220;<EM>that&#8217;s&nbsp;another item to add to our checklist<\/EM>&#8221; or &#8220;<EM>that&#8217;s a good trick to add to our arsenal<\/EM>&#8221; and well, I thought in this blog entry I&#8217;d ask for <STRONG><EM>your <\/EM><\/STRONG>tricks that fall under the umbrella of <STRONG>designing for performance<\/STRONG>. <\/P><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P>For example &#8211; do you change collations? I had a recommendation <a href=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/permalink.aspx?guid=7b4c9796-66d0-4ed2-b19d-bef6bb1e3e1d\">here<\/a>. <BR>For example &#8211; do you have a view that you want ordered? I had a recommendation (with caution) <a href=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/permalink.aspx?guid=79de45cb-2da6-4510-ae43-7e5e42e4c02e\">here<\/a>. But &#8211; <a href=\"http:\/\/www.drdobbs.com\/database\/\" class=\"broken_link\">Adam Mechanic<\/a> came back and said that he&#8217;s used that trick to improve performance&#8230; and, I&#8217;m sure that&#8217;s the case as well!<BR>For example &#8211; do you have stored procedure parameters that are giving you grief? I had a series of recommendations in my Optimizing Procedural Code category <a href=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/categoryview.aspx?category=Optimizing%20Procedural%20Code\">here<\/a>.<\/P><\/BLOCKQUOTE><br \/>\n<P>In fact, sometimes the best form of &#8220;hint&#8221; to SQL Server is <STRONG>NOT <\/STRONG>an optimizer hint but instead a more subtle change to the join (derived tables for example) or the infamous subquery -&gt; join rewrite or the join -&gt; subquery rewrite. I&#8217;m always asked &#8220;which is better &#8211; a subquery or a join&#8221; and I always answer YES. ;-)&nbsp; OR taking a complex process and breaking it down into temp tables (I&#8217;d try to create views instead of temp tables first and see if the optimizer figures it out but there are cases when sometimes they just don&#8217;t). Remember, it&#8217;s not the optimizer&#8217;s job to find the absolutely BEST plan; it&#8217;s their job to find a good plan fast. And &#8211; they typically do. Really, no general &#8220;tricks&#8221; work <STRONG>ALL <\/STRONG>of the time and often <U><STRONG>they don&#8217;t help at all<\/STRONG><\/U> but there are LOTS of things that I&#8217;m sure you&#8217;ve done and you really want to tell someone about it. How about here? I&#8217;m going to try to compile these tips\/tricks into a best of&#8230; <\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Been thinking a lot about something that was mentioned in a few of my most recent posts&#8230; Especially when I get comments like &#8220;that&#8217;s&nbsp;another item to add to our checklist&#8221; or &#8220;that&#8217;s a good trick to add to our arsenal&#8221; and well, I thought in this blog entry I&#8217;d ask for your tricks that fall [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,65,78],"tags":[],"class_list":["post-623","post","type-post","status-publish","format-standard","hentry","category-design","category-sql-server-2005","category-tips"],"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/comments?post=623"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/posts\/623\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/media?parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/categories?post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/tags?post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}