{"id":710,"date":"2004-07-24T05:37:44","date_gmt":"2004-07-24T05:37:44","guid":{"rendered":"\/blogs\/kimberly\/post\/MSDN-Webcast-QA-Index-Defrag-Best-Practices-General-Questions.aspx"},"modified":"2013-01-02T07:07:20","modified_gmt":"2013-01-02T15:07:20","slug":"msdn-webcast-qa-index-defrag-best-practices-general-questions","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/msdn-webcast-qa-index-defrag-best-practices-general-questions\/","title":{"rendered":"MSDN Webcast Q&#038;A: Index Defrag Best Practices &#8211; General Questions"},"content":{"rendered":"<p><P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><B style=\"mso-bidi-font-weight: normal\"><FONT face=Arial><FONT color=#000000><FONT size=3>Q: Does clustering rely on the operating system for performance?<?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" \/><o:p><\/o:p><\/FONT><\/FONT><\/FONT><\/B><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><FONT color=#000000><FONT size=3><FONT face=Arial>Well, I have to admit I am not entirely sure of the question here&#8230; But &#8211; I think I understand from where it might originate (well, I&#8217;ll try). First &#8211; and unfortunately (<I style=\"mso-bidi-font-style: normal\">and also somewhat seriously<\/I>), I think many people lack creativity in choosing a term for something &#8211; at least in the computer industry! <\/FONT><SPAN style=\"FONT-FAMILY: Wingdings; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-char-type: symbol; mso-symbol-font-family: Wingdings\"><SPAN style=\"mso-char-type: symbol; mso-symbol-font-family: Wingdings\">J<\/SPAN><\/SPAN><FONT face=Arial> Here, I think the confusion is between &#8220;clustered index&#8221; and the OS term\/feature &#8220;clustering.&#8221; The term clustered index stems from having data &#8220;clustered&#8221; in a certain order or grouping. In previous releases, we tended to create the clustered index for range queries (like on LastName) and therefore people with the same LastName were &#8220;clustered&#8221; together. However, because the internals of SQL Server changed [significantly] between 6.5 and 7.0 the internals really dictated a change in where the clustered index should be created. So, even though the term didn&#8217;t change it doesn&#8217;t entirely apply. Now the OS term\/feature &#8220;clustering&#8221; applies to high availability. Specifically, failover clustering refers to a feature of the Enterprise Edition of SQL Server &#8211; which requires a higher level of Windows (typically an &#8220;Advanced&#8221;, &#8220;DataCenter&#8221;, or &#8220;<?xml:namespace prefix = st1 ns = \"urn:schemas-microsoft-com:office:smarttags\" \/><st1:City w:st=\"on\"><st1:place w:st=\"on\">Enterprise<\/st1:place><\/st1:City>&#8221; version) to support it. This really is not the primary focus for this webcast but below are a couple of references if you want to understand more about High Availability and Failover Clustering in SQL Server: <\/FONT><\/FONT><\/FONT><\/P><br \/>\n<UL style=\"MARGIN-TOP: 0in\" type=disc><br \/>\n<LI class=MsoNormal style=\"MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in\"><FONT face=Arial color=#000000 size=3>MSPress title: <\/FONT><a href=\"http:\/\/www.microsoft.com\/learning\/en\/us\/book.aspx?ID=6515&amp;locale=en-us\"><FONT face=Arial size=3>SQL Server 2000 High Availability<\/FONT><\/a><FONT face=Arial color=#000000 size=3>, and a <\/FONT><a href=\"https:\/\/www.sqlskills.com\/resources\/sqlserverhachapter9.pdf\"><FONT face=Arial size=3>sample chapter for download<\/FONT><\/a><FONT face=Arial color=#000000 size=3> from the home page of <\/FONT><A href=\"https:\/\/www.sqlskills.com\/\"><FONT face=Arial size=3>SQLskills.com<\/FONT><\/A><FONT face=Arial color=#000000 size=3>.<\/FONT><br \/>\n<LI class=MsoNormal style=\"MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in\"><FONT face=Arial color=#000000 size=3>The <\/FONT><a href=\"http:\/\/technet.microsoft.com\/library\/cc984388\"><FONT face=Arial size=3>SQL Server Resource Kit<\/FONT><\/a><FONT face=Arial color=#000000 size=3>, specifically Chapter 4: Availability<\/FONT><\/LI><\/UL><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><o:p><FONT face=Arial color=#000000 size=3>&nbsp;<\/FONT><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><B style=\"mso-bidi-font-weight: normal\"><FONT face=Arial><FONT color=#000000><FONT size=3>Q: How well are Microsoft&#8217;s standard products that use SQL optimized? Are there published studies on optimizing Microsoft CRM, Sharepoint Services, Project Server, and the various Microsoft Business Products?<o:p><\/o:p><\/FONT><\/FONT><\/FONT><\/B><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><FONT color=#000000><FONT size=3><FONT face=Arial>This one I <I style=\"mso-bidi-font-style: normal\">kind of<\/I> answered during the webcast&#8230;First, I will start by mentioning that I&#8217;m NOT an expert on any of these products specifically. However, you are correct in that they are based on SQL Server and use SQL Server as their data store. What that means is that they too must be optimized and maintained; however, it is impossible for anyone to predict perfectly the exact usage of each of these products and as a result they might have a good selection of indexes but they are unlikely to have maintenance operations defined. However &#8211; again, I cannot say that I am an expert and I could be wrong! What I will say however, is that regardless of what is defined and what is maintained &#8211; you can create additional indexes, possibly drop indexes (<I style=\"mso-bidi-font-style: normal\">more on this in a moment<\/I>) and maintain indexes with NO application changes. The reason why I say &#8220;possibly&#8221; drop indexes is because queries\/procedures, etc. will FAIL if index hints are used and the index does not exist at runtime. And while I&#8217;m fairly certain that NO Microsoft product hardcodes index hints, I have seen other third party products which do and unfortunately they become VERY hard to optimize and manage. In general, it is harder to drop indexes than add indexes. Nevertheless, it is always possible to defrag\/rebuild indexes &#8211; regardless of the application whether Microsoft of not. So, while I can&#8217;t speak to each of these applications directly (<I style=\"mso-bidi-font-style: normal\">although my partner works on Microsoft Project and he&#8217;s pretty sharp!<\/I> <\/FONT><SPAN style=\"FONT-FAMILY: Wingdings; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-char-type: symbol; mso-symbol-font-family: Wingdings\"><SPAN style=\"mso-char-type: symbol; mso-symbol-font-family: Wingdings\">J<\/SPAN><\/SPAN><FONT face=Arial>), you can always improve upon an application with better\/more useful indexes (meaning more specific indexes for YOUR usage patterns and requirements) and proper\/consistent\/automated index maintenance.<\/FONT><\/FONT><\/FONT><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><o:p><FONT face=Arial color=#000000 size=3>&nbsp;<\/FONT><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><FONT color=#000000><FONT size=3><FONT face=Arial><B>Q: <\/B><B style=\"mso-bidi-font-weight: normal\">Is there any internal command to output query plan used by optimizer (not showplan or external tools available), which may show splits with DML operations?<o:p><\/o:p><\/B><\/FONT><\/FONT><\/FONT><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><FONT face=Arial color=#000000 size=3>Well, I&#8217;ll start by saying that these are really two different parts to your query processing. First, splits are NOT part of the optimization plan as they are only known at runtime. So, a plan really wouldn&#8217;t ever show them. As a result, I don&#8217;t believe an <B style=\"mso-bidi-font-weight: normal\">internal<\/B> command exists to show this; however, I&#8217;m a bit confused as to why it must be &#8220;internal&#8221; and not something else? Are you just trying to determine which commands and in which tables you are having a lot of splits? (<I style=\"mso-bidi-font-style: normal\">And IMO, this is the most important.<\/I>). If that&#8217;s the case then you can start by using PerfMon to see if you have splits (and get a rough idea of when) and then use DBCC SHOWCONTIG to see which tables are fragmented (meaning they had the splits). Perf Mon will only tell you that you have them &#8211; not in which table they are occurring (<I style=\"mso-bidi-font-style: normal\">but I will say that you might be very pleased with a few new features of SQL Server 2005 &#8211; look forward to playing with beta II Profiler and PerfMon<\/I>). Right now, check out PerfMon SQL Server: Access Methods, Page Splits\/sec.<\/FONT><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><o:p><FONT face=Arial color=#000000 size=3>&nbsp;<\/FONT><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><B style=\"mso-bidi-font-weight: normal\"><FONT color=#000000><FONT size=3><FONT face=Arial>Q: How do we use the I\/O affinity option in SQL Server 2000?<o:p><\/o:p><\/FONT><\/FONT><\/FONT><\/B><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><FONT face=Arial color=#000000 size=3>Actually, I&#8217;ll let the KB take care of this one. Check out KB Article Q298402 titled: <\/FONT><a href=\"http:\/\/support.microsoft.com\/default.aspx?scid=kb;en-us;298402\" class=\"broken_link\"><FONT face=Arial size=3>INF: Understanding How to Set the SQL Server I\/O Affinity Option<\/FONT><\/a><FONT face=Arial color=#000000 size=3>.<\/FONT><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><o:p><FONT face=Arial color=#000000 size=3>&nbsp;<\/FONT><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><B style=\"mso-bidi-font-weight: normal\"><FONT color=#000000><FONT size=3><FONT face=Arial>Q: Can we use MAXDOP with Index Creation?<o:p><\/o:p><\/FONT><\/FONT><\/FONT><\/B><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><FONT face=Arial color=#000000 size=3>No, MAXDOP is supported only as a query hint &#8211; for DML (SELECT, UPDATE, etc.) statements. However, if you want to limit all operations to a reduced number of CPUs you can set the <B style=\"mso-bidi-font-weight: normal\">server<\/B> setting Max Degree of Parallelism. See the sp_configure option in the Books Online as well as KB Article 329204 titled: <\/FONT><a href=\"http:\/\/support.microsoft.com\/default.aspx?scid=kb;en-us;329204\" class=\"broken_link\"><FONT face=Arial size=3>INF: General Guidelines to Use to Configure the MAXDOP Option<\/FONT><\/a><FONT face=Arial color=#000000 size=3>.<\/FONT><\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q: Does clustering rely on the operating system for performance? Well, I have to admit I am not entirely sure of the question here&#8230; But &#8211; I think I understand from where it might originate (well, I&#8217;ll try). First &#8211; and unfortunately (and also somewhat seriously), I think many people lack creativity in choosing a [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,36,58],"tags":[],"class_list":["post-710","post","type-post","status-publish","format-standard","hentry","category-events","category-indexes","category-resources"],"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/posts\/710","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=710"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/posts\/710\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/media?parent=710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/categories?post=710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/tags?post=710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}