﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by David Durant  / Stairway to SQL Server Indexes: Level 15, Indexing Best Practices / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 16:17:15 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>[quote][b]bwilliams-1049831 (3/28/2012)[/b][hr]Avoid using fields in indexes that are updated frequently.Status fields are a prime example. Each time the field is updated the index has to be updated.[/quote]Maybe. Depends on how often that field is filtered on, how important the queries that filter on it are, etc. It's a tradeoff and has to be evaluated case-by-case. If the status is frequently updated but seldom searched on then an index on it would indeed be a bad thing.Indexes on frequently changing columns don't automatically cause deadlocks, if you're talking about key lookup deadlocks then the usual way to prevent the deadlocks is to ensure the index is covering (or use one of the row version based isolation levels)</description><pubDate>Wed, 28 Mar 2012 12:54:06 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>In the Indexing best practicesHere is another avoidAvoid using fields in indexes that are updated frequently.Status fields are a prime example. Each time the field is updated the index has to be updated.This is a major cause of deadlocking on the index structures of one application where I am currently employed and has caused me endless grief.There are 6 different statuses as the record proceeds through our system and a dashboard watches it real time from created, validated, ready, processing, sent, complete. Each time causes the index to be updated as well.</description><pubDate>Wed, 28 Mar 2012 11:29:13 GMT</pubDate><dc:creator>bwilliams-1049831</dc:creator></item><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>Thanks for very clear overview of indexing considerations. A related topic that is sometimes overlook is the challenge of predicting the effects of an individual index on the workload as a whole. A recent article by Ami Levin, [url=http://www.dbsophic.com/SQL-Server-Articles/sql-server-hidden-menace-create-index.html]The Hidden Menace of CREATE INDEX[/url], highlights this issue with some vivid examples. Worth a read.</description><pubDate>Wed, 28 Mar 2012 07:59:52 GMT</pubDate><dc:creator>gil 17845</dc:creator></item><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>One guideline I strongly disagree with...[quote]Avoid Nonclustered, Unfiltered Indexes on Columns that have few Distinct Values The old cliché is “Never index the Gender column”. A typical page of the table will have half female rows and half male rows, and will be accessed whether the request is for female rows or for male rows. A table scan will always be the best decision for any WHERE GENDER = … query; therefore, such an index will never be of benefit to the optimizer. [/quote]Not at all. While an index on [i]just[/i] the Gender column may not be very useful, an index that starts with the gender column, perhaps has other key columns and maybe an include column or two can be very, very useful indeed, especially if you have a lot of queries that filter on gender and ...A table scan will not always be the best decision for a filter on a high density column (high density = not very unique). If the index on the column is covering, seeks can and will be used even up to cases where 100% of the rows in the table affected by the query.Also[quote]Consider Using a Foreign Key in the Search Key of the Clustered Index [/quote]Maybe, but by doing so you're losing the ever-increasing attribute that is suggested for clustered indexes and maybe (depending what the other key columns are and if the foreign key every changes) the narrow, unchanging and unique as well</description><pubDate>Wed, 28 Mar 2012 02:17:53 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>Two comments:1) Thanks for writting the series.  It is always nice to review information.  Being reminded of something useful or learning something new is always a pleasant surprise.  I think I was both reminded of something useful and learned something new in this series.2) In the final segment, your comments for the following sections are identical:-Consider Using a Foreign Key in the Search Key of the Clustered In-Consider Having Included Columns in your Indexes</description><pubDate>Thu, 23 Feb 2012 15:06:22 GMT</pubDate><dc:creator>Ray Ayyelos</dc:creator></item><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>My reason for creating a clustered index on RID is thatWhere using the non clustered index for joins or queries, if the RID was an output of the query or join, then it will be satisfied by an index seek or scan without having to do an RID lookup, hence behaving like an included index.Else, you will be hit with RID lookup, if table is a heap. Execution plans also become easier to optimise [seek plus lookup becomes only seek]so SQL can make a better choice of what to do.Secondly a scan of RID is faster than if it was a scan of nonclustered index, in the cases where scans are unavoidable, 64k reads on clustered index pages vs (8k reads and jumping between non clustered index and Table).</description><pubDate>Tue, 13 Sep 2011 23:51:04 GMT</pubDate><dc:creator>MadAdmin</dc:creator></item><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>all the articles were amazing i got a better idea on how to implement indexes using best practices</description><pubDate>Mon, 22 Aug 2011 16:28:40 GMT</pubDate><dc:creator>jthalliens2004</dc:creator></item><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>Thanks for putting the effort into writing this complete guide. It's made a lot of things and issues a lot more clear to me.</description><pubDate>Wed, 13 Jul 2011 00:21:45 GMT</pubDate><dc:creator>rrn 62873</dc:creator></item><item><title>RE: Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>You repeat explanation of "Consider Using a Foreign Key in the Search Key of the Clustered Index" in "Consider Having Included Columns in your Indexes " ;-)</description><pubDate>Mon, 11 Jul 2011 03:48:20 GMT</pubDate><dc:creator>Ognjen Kovacevic</dc:creator></item><item><title>Stairway to SQL Server Indexes: Level 15, Indexing Best Practices</title><link>http://www.sqlservercentral.com/Forums/Topic1139626-2904-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/Stairway+Series/72447/"&gt;Stairway to SQL Server Indexes: Level 15, Indexing Best Practices&lt;/A&gt;[/B]</description><pubDate>Mon, 11 Jul 2011 03:45:56 GMT</pubDate><dc:creator>David Durant</dc:creator></item></channel></rss>