<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx</link><description>In some situations, using the SQLIndex property on a key in Microsoft Dynamics NAV can harm performance. In this blog I describe what to be careful about, and why the use of this property has been removed in the NAV 5 SP1 application. The property is</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8416457</link><pubDate>Tue, 22 Apr 2008 15:40:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8416457</guid><dc:creator>stryk</dc:creator><description>&lt;p&gt;Thank you for this advice. I also recommend to be careful with changing the &amp;quot;SQL Index&amp;quot; too much from the &amp;quot;Key&amp;quot; setting as the difference between the Index and the Sorting could be a problem.&lt;/p&gt;
&lt;p&gt;Anyway, I strongly recommend to USE the &amp;quot;SQL Index&amp;quot; property, by simply copying the content from &amp;quot;Key&amp;quot;. This - I call it &amp;quot;basic streamlining&amp;quot; - creates the index with the same order of fields, but not UNIQUE and without the dispensable Primary Key fields which are normally added, hence the index gets remarkably smaller, performing better!&lt;/p&gt;
&lt;p&gt;(I don't know if this is still applicable with NAV 5.0 SP1)&lt;/p&gt;
&lt;p&gt;Then, in specific cases it might be feasible to do further tuning, e.g. removing more fields or changing the order by selectivity, but as you say: if done wrong, this could also harm.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;J&amp;#246;rg&lt;/p&gt;
</description></item><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8416602</link><pubDate>Tue, 22 Apr 2008 17:40:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8416602</guid><dc:creator>Lohndorf</dc:creator><description>&lt;p&gt;Hi J&amp;#246;rg,&lt;/p&gt;
&lt;p&gt;Thanks for sharing your experiences here! Interesting point about &amp;quot;basic streamlining&amp;quot;, and I don't see any reasons why this will be different in SP1.&lt;/p&gt;
&lt;p&gt;Any more comments, keep them coming,&lt;/p&gt;
&lt;p&gt;Lars&lt;/p&gt;
</description></item><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8417307</link><pubDate>Wed, 23 Apr 2008 00:52:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8417307</guid><dc:creator>sguzek</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We can change SQL query generated for table by using hints or query plans. Can we do the same for queries relating SIFT tables, or SIFT views ? &lt;/p&gt;
&lt;p&gt;How with(NOEXPAND)query hint can be removed from the query reading from SIFT view ? For SQL Standard Edition this is good, because forces Query Optimizer to use clustered index created on SIFT view, but what with SQL Enterprise Edition ? &amp;nbsp;Will Query Optimizer use any of extra indexes defined on SIFT views when with(NOEXPAND) hint is present in the SQL query ?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Slawek&lt;/p&gt;
</description></item><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8418392</link><pubDate>Wed, 23 Apr 2008 09:46:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8418392</guid><dc:creator>Lohndorf</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is not possible to control the SIFT queries (SELECT SUM) from Nav. The methods to add index hints only work for normal queries. But of course any SQL methods, like plan guides will work on any query.&lt;/p&gt;
&lt;p&gt;The reason for using NOEXPAND is, that otherwise Indexed Views are only supported on SQL Enterprise edition. Quote from this link( &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/ms181151.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms181151.aspx&lt;/a&gt; ):&lt;/p&gt;
&lt;p&gt;&amp;quot;In SQL Server 2005 Enterprise Edition, the query optimizer automatically considers the indexed view. To use an indexed view in all other editions, the NOEXPAND table hint must be used.&amp;quot;&lt;/p&gt;
&lt;p&gt;Hope that explains?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Lars&lt;/p&gt;
</description></item><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8418954</link><pubDate>Wed, 23 Apr 2008 15:30:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8418954</guid><dc:creator>sguzek</dc:creator><description>&lt;p&gt;Hi Lars,&lt;/p&gt;
&lt;p&gt;Thanks, that explains a lot. &lt;/p&gt;
&lt;p&gt;One more question is - I know that NOEXPAND hint forces query optimizer to use clustered index on indexed view. But when we are using Enterprise version does the NOEXPAND hint prevents to use any other than clustered index created on view ? &lt;/p&gt;
&lt;p&gt;My guess is yes, so in order to use other indexes I need to create plan guide to remove NOEXPAND hint from SELECT SUM query, and I have to create one plan for every indexed view if I want to force query optimizer to select and pick the best index &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Slawek.&lt;/p&gt;
</description></item><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8419017</link><pubDate>Wed, 23 Apr 2008 16:11:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8419017</guid><dc:creator>Lohndorf</dc:creator><description>&lt;p&gt;Hi Slawek,&lt;/p&gt;
&lt;p&gt;Yes, you can say we have to use lowest common denominator, rather than generating different queries depending on the SQL edition. So removing NOEXPAND would have to be done from the SQL side.&lt;/p&gt;
&lt;p&gt;Just out of curiosity, do you know how big an effect NOEXPAND has? Is removing it something that can create dramatic performance increases?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Lars&lt;/p&gt;
</description></item><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8463363</link><pubDate>Tue, 06 May 2008 19:11:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8463363</guid><dc:creator>Jan Stepanek</dc:creator><description>&lt;p&gt;Hi Lars,&lt;/p&gt;
&lt;p&gt;I not agree that SQLindex property is a problem. By my opinion problem is index hinting - WITH (UPDLOCK, INDEX(&amp;quot;$1&amp;quot;)). SQLindex propery allowed NAV pragramers create better index than NAV index - with hight selectivity.&lt;/p&gt;
&lt;p&gt;If WITH (UPDLOCK, INDEX(&amp;quot;$1&amp;quot;)) did not in this exapmle, SQL server use better index.&lt;/p&gt;
&lt;p&gt;best regards,&lt;/p&gt;
&lt;p&gt;Jan Stepanek&lt;/p&gt;
</description></item><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8573492</link><pubDate>Wed, 04 Jun 2008 18:27:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8573492</guid><dc:creator>davmac1</dc:creator><description>&lt;p&gt;Is the problem really using hints in conjunction with SQLindex - have you tried SQLindex without hints on SQL Server 2005?&lt;/p&gt;
&lt;p&gt;It appears we need different tuning tips for each SQL Server release.&lt;/p&gt;
</description></item><item><title>re: SQLIndex property</title><link>http://blogs.msdn.com/microsoft_dynamics_nav_sustained_engineering/archive/2008/04/21/sqlindex-property.aspx#8591011</link><pubDate>Wed, 11 Jun 2008 10:58:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8591011</guid><dc:creator>Lohndorf</dc:creator><description>&lt;p&gt;Yes, the cases that I have seen, had default index hinting on. In theory, the problem could exist also without Index Hinting, since by definition you get an ORDER BY without a matching index. But that's the nature of the SQLIndex property anyway. And, of course default index hinting is not used in 5 SP1 any longer.&lt;/p&gt;
&lt;p&gt;So my advice would be to keep using the SQLIndex property as before. But just be aware that if used in combination with index hints, it can cause problems.&lt;/p&gt;
</description></item></channel></rss>