<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Missing Index in SQL Server 2008 &#8211; should try harder!	</title>
	<atom:link href="https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/feed/" rel="self" type="application/rss+xml" />
	<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/</link>
	<description></description>
	<lastBuildDate>Wed, 05 Nov 2008 20:23:23 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>
		By: Tony		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-644</link>

		<dc:creator><![CDATA[Tony]]></dc:creator>
		<pubDate>Wed, 05 Nov 2008 20:23:23 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-644</guid>

					<description><![CDATA[The missing index suggestion in SQL 2008 SSMS is like DTA command line util in SQL 2005.
Nice feature.

http://sqlkingz.blogspot.com
]]></description>
			<content:encoded><![CDATA[<p>The missing index suggestion in SQL 2008 SSMS is like DTA command line util in SQL 2005.<br />
Nice feature.</p>
<p><a href="http://sqlkingz.blogspot.com" rel="nofollow ugc">http://sqlkingz.blogspot.com</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Greg Larsen		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-643</link>

		<dc:creator><![CDATA[Greg Larsen]]></dc:creator>
		<pubDate>Sun, 02 Nov 2008 21:57:05 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-643</guid>

					<description><![CDATA[I think it is kind of funny that when run Rob&#039;s query and then look a the missing index stats the included_columns are not showing up when running the following query:

 SELECT *  
 FROM sys.dm_db_missing_index_groups AS g    
	join sys.dm_db_missing_index_group_stats AS gs ON gs.group_handle = g.index_group_handle    
	join sys.dm_db_missing_index_details d ON g.index_handle = d.index_handle; 

It might be nice to know why the optimizer is not picking up these included columns.  

But now if you change Rob&#039;s query to be an inequality query like so: 

select productid, orderqty   
from sales.salesorderdetail
where carriertrackingnumber &gt; &#039;FB88-4B92-82&#039;;

Now the suggested missing index now has the appropriate INCLUDED columns.  

Oh, by the way all my testing was on a 32bit machine. 


]]></description>
			<content:encoded><![CDATA[<p>I think it is kind of funny that when run Rob&#8217;s query and then look a the missing index stats the included_columns are not showing up when running the following query:</p>
<p> SELECT *<br />
 FROM sys.dm_db_missing_index_groups AS g<br />
	join sys.dm_db_missing_index_group_stats AS gs ON gs.group_handle = g.index_group_handle<br />
	join sys.dm_db_missing_index_details d ON g.index_handle = d.index_handle; </p>
<p>It might be nice to know why the optimizer is not picking up these included columns.  </p>
<p>But now if you change Rob&#8217;s query to be an inequality query like so: </p>
<p>select productid, orderqty<br />
from sales.salesorderdetail<br />
where carriertrackingnumber > &#8216;FB88-4B92-82&#8217;;</p>
<p>Now the suggested missing index now has the appropriate INCLUDED columns.  </p>
<p>Oh, by the way all my testing was on a 32bit machine. </p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: robfarley		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-642</link>

		<dc:creator><![CDATA[robfarley]]></dc:creator>
		<pubDate>Wed, 22 Oct 2008 16:13:44 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-642</guid>

					<description><![CDATA[Yes, I agree wholeheartedly - creating indexes should be considered very carefully.

My point is simply that when considering one query in isolation (as we see with the Missing Indexes section of an execution plan now), it should suggest the best index for that query. If the administrator chooses to implement something else, then that&#039;s fine.

I definitely don&#039;t advocate creating every index that the system suggests. I would simply prefer it to suggest the index that would see the most improvement for the query in the plan.]]></description>
			<content:encoded><![CDATA[<p>Yes, I agree wholeheartedly &#8211; creating indexes should be considered very carefully.</p>
<p>My point is simply that when considering one query in isolation (as we see with the Missing Indexes section of an execution plan now), it should suggest the best index for that query. If the administrator chooses to implement something else, then that&#8217;s fine.</p>
<p>I definitely don&#8217;t advocate creating every index that the system suggests. I would simply prefer it to suggest the index that would see the most improvement for the query in the plan.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Greg_Linwood		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-641</link>

		<dc:creator><![CDATA[Greg_Linwood]]></dc:creator>
		<pubDate>Wed, 22 Oct 2008 14:57:59 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-641</guid>

					<description><![CDATA[Whether this index should include ProductID or not depends only on whether you decide its important for the query to complete in 3 reads vs 6 &amp; that the overheads associated with having the extra column included are worth the minicsule saving in reads.

Index maintenance overheads are often described in terms of DML overhead (updates etc). Less widely recognised is the extra space index columns take up, which have daily implications for disk space management, backups, index maintenance &amp; log shipping. These are real problems which should be taken into consideration when deciding to simply throw an extra column onto an index.

Adding extra columns onto indexes should be given similar consideration to throwing extra columns onto tables..
]]></description>
			<content:encoded><![CDATA[<p>Whether this index should include ProductID or not depends only on whether you decide its important for the query to complete in 3 reads vs 6 &#038; that the overheads associated with having the extra column included are worth the minicsule saving in reads.</p>
<p>Index maintenance overheads are often described in terms of DML overhead (updates etc). Less widely recognised is the extra space index columns take up, which have daily implications for disk space management, backups, index maintenance &#038; log shipping. These are real problems which should be taken into consideration when deciding to simply throw an extra column onto an index.</p>
<p>Adding extra columns onto indexes should be given similar consideration to throwing extra columns onto tables..</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: robfarley		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-640</link>

		<dc:creator><![CDATA[robfarley]]></dc:creator>
		<pubDate>Mon, 20 Oct 2008 16:05:45 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-640</guid>

					<description><![CDATA[I think there&#039;s a big difference between the results you can get from the DTA looking at a whole batch, compared to looking at a single query. For a single query, it should be suggesting the best index (perhaps with a disclaimer). For a batch of queries, a degree of compromise could be considered.

All the suggestions should come with a bit of a warning about the fact that indexes should be considered carefully.]]></description>
			<content:encoded><![CDATA[<p>I think there&#8217;s a big difference between the results you can get from the DTA looking at a whole batch, compared to looking at a single query. For a single query, it should be suggesting the best index (perhaps with a disclaimer). For a batch of queries, a degree of compromise could be considered.</p>
<p>All the suggestions should come with a bit of a warning about the fact that indexes should be considered carefully.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: TheSQLGuru		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-639</link>

		<dc:creator><![CDATA[TheSQLGuru]]></dc:creator>
		<pubDate>Mon, 20 Oct 2008 11:30:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-639</guid>

					<description><![CDATA[I disagree here.  I think the DTA goes way TOO far in INCLUDING columns to create covering indexes.  I have seen it absolutely destroy databases (and database performance) with bloated indexes.  I just cleaned out 60% of the databases a client had in their database because they ran DTA on a workload and accepted everything.  Massive bloat, blocks and locks all over the place.  The indexes I left caused just a small amount of read increases for select activity but made the DML stuff WAY faster.]]></description>
			<content:encoded><![CDATA[<p>I disagree here.  I think the DTA goes way TOO far in INCLUDING columns to create covering indexes.  I have seen it absolutely destroy databases (and database performance) with bloated indexes.  I just cleaned out 60% of the databases a client had in their database because they ran DTA on a workload and accepted everything.  Massive bloat, blocks and locks all over the place.  The indexes I left caused just a small amount of read increases for select activity but made the DML stuff WAY faster.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: robfarley		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-638</link>

		<dc:creator><![CDATA[robfarley]]></dc:creator>
		<pubDate>Sun, 19 Oct 2008 15:39:29 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-638</guid>

					<description><![CDATA[Gail,

On my machine, the included columns aren&#039;t there in the XML or in the DMV.

@@version gives:
Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)   Jul  9 2008 14:43:34   Copyright (c) 1988-2008 Microsoft Corporation  Developer Edition on Windows NT 6.0 &lt;X86&gt; (Build 6001: Service Pack 1) 

And yes - whilst in the past I&#039;ve found that there were too many included columns listed, I now find this!

Anyway - we&#039;ll have to see what other people find too.

Rob
]]></description>
			<content:encoded><![CDATA[<p>Gail,</p>
<p>On my machine, the included columns aren&#8217;t there in the XML or in the DMV.</p>
<p>@@version gives:<br />
Microsoft SQL Server 2008 (RTM) &#8211; 10.0.1600.22 (Intel X86)   Jul  9 2008 14:43:34   Copyright (c) 1988-2008 Microsoft Corporation  Developer Edition on Windows NT 6.0 <x86> (Build 6001: Service Pack 1) </p>
<p>And yes &#8211; whilst in the past I&#8217;ve found that there were too many included columns listed, I now find this!</p>
<p>Anyway &#8211; we&#8217;ll have to see what other people find too.</p>
<p>Rob<br />
</x86></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Gail		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-637</link>

		<dc:creator><![CDATA[Gail]]></dc:creator>
		<pubDate>Sun, 19 Oct 2008 07:18:46 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-637</guid>

					<description><![CDATA[I would hope it&#039;s not a 32/64 issue! I&#039;d be very worried if some of the core features (optimiser) behave differently on 32/64. Unfortunately I don&#039;t have a 32-bit server to test on.

Can you check the missing index DMV, see if the include columns are listed there? Also, maybe have a look in the exec plan&#039;s XML at the missing index section. 

I&#039;m curious as to whether it&#039;s the optimiser not noticing that the include columns would be useful, or management studio just displaying the missing index details wrong.

FWIW, most of the time I find the missing indexes to have too many include columns (up to the point of including the entire table), not too few.

What build of 2008 are you running there?]]></description>
			<content:encoded><![CDATA[<p>I would hope it&#8217;s not a 32/64 issue! I&#8217;d be very worried if some of the core features (optimiser) behave differently on 32/64. Unfortunately I don&#8217;t have a 32-bit server to test on.</p>
<p>Can you check the missing index DMV, see if the include columns are listed there? Also, maybe have a look in the exec plan&#8217;s XML at the missing index section. </p>
<p>I&#8217;m curious as to whether it&#8217;s the optimiser not noticing that the include columns would be useful, or management studio just displaying the missing index details wrong.</p>
<p>FWIW, most of the time I find the missing indexes to have too many include columns (up to the point of including the entire table), not too few.</p>
<p>What build of 2008 are you running there?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: robfarley		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-636</link>

		<dc:creator><![CDATA[robfarley]]></dc:creator>
		<pubDate>Sun, 19 Oct 2008 04:30:11 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-636</guid>

					<description><![CDATA[Oh? Perhaps it behaves differently in x64.

That&#039;s really interesting. Thanks.]]></description>
			<content:encoded><![CDATA[<p>Oh? Perhaps it behaves differently in x64.</p>
<p>That&#8217;s really interesting. Thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Gail		</title>
		<link>https://lobsterpot.com.au/blog/2008/10/12/missing-index-in-sql-server-2008-should-try-harder/#comment-635</link>

		<dc:creator><![CDATA[Gail]]></dc:creator>
		<pubDate>Sun, 19 Oct 2008 04:23:01 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/10/12/missing-index-in-sql-server-2008-should-try-harder.aspx#comment-635</guid>

					<description><![CDATA[Kinda odd. When I run that query on Adventureworks2008 (SQL 2008 RTM x64) the missing index it lists is

CREATE NONCLUSTERED INDEX [&lt;Name of Missing Index, sysname,&gt;]
ON [Sales].[SalesOrderDetail] ([CarrierTrackingNumber])
INCLUDE ([OrderQty],[ProductID])]]></description>
			<content:encoded><![CDATA[<p>Kinda odd. When I run that query on Adventureworks2008 (SQL 2008 RTM x64) the missing index it lists is</p>
<p>CREATE NONCLUSTERED INDEX [<name of Missing Index, sysname,>]<br />
ON [Sales].[SalesOrderDetail] ([CarrierTrackingNumber])<br />
INCLUDE ([OrderQty],[ProductID])</name></p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
