<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.sqlserver.org.au/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>Duplicate indexes</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/29/1233.aspx</link><description>SQL Server curiously allows duplicate indexes to be created on a table with precisely identical definitions.&amp;nbsp;There is absolutely zero benefit from this practise yet significant harm can result - including:

Performance degradation from maintenance</description><dc:language>en-AU</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>sqlserver 7 indexes</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/29/1233.aspx#1282</link><pubDate>Fri, 11 Jul 2008 02:49:17 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1282</guid><dc:creator>Anonymous</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://evanwebsite.madoo.com/sqlserver7indexes.html"&gt;http://evanwebsite.madoo.com/sqlserver7indexes.html&lt;/a&gt;</description></item><item><title>re: Duplicate indexes</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/29/1233.aspx#1503</link><pubDate>Tue, 31 Mar 2009 22:10:25 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1503</guid><dc:creator>Paul White</dc:creator><description>Hi Greg,&lt;br&gt;&lt;br&gt;Here's a (contrived) example of a useful duplicate index, which might just be of use on a read-heavy table where the concurrency benefit outweighs the modification overhead...&lt;br&gt;&lt;br&gt;-- Set up demo&lt;br&gt;CREATE TABLE dbo.Temp (A INT NOT NULL, B INT NOT NULL);&lt;br&gt;DECLARE @i INT;&lt;br&gt;SET NOCOUNT ON;&lt;br&gt;SET @i = 0;&lt;br&gt;WHILE @i &amp;lt; 100000&lt;br&gt;BEGIN&lt;br&gt;	INSERT dbo.Temp(A, B) VALUES (@i, @i);&lt;br&gt;	SET @i = @i + 1;&lt;br&gt;END;&lt;br&gt;&lt;br&gt;-- Duplicate indexes&lt;br&gt;-- Note that row locks are disabled&lt;br&gt;-- (for a good operational reason!)&lt;br&gt;CREATE UNIQUE NONCLUSTERED INDEX i1 ON dbo.Temp (B ASC) WITH (ALLOW_ROW_LOCKS = OFF);&lt;br&gt;CREATE UNIQUE NONCLUSTERED INDEX i2 ON dbo.Temp (B ASC) WITH (ALLOW_ROW_LOCKS = OFF);&lt;br&gt;&lt;br&gt;-- In query window 1&lt;br&gt;BEGIN TRAN;&lt;br&gt;UPDATE T SET A = -1 FROM dbo.Temp AS T WITH (HOLDLOCK, INDEX(i1)) WHERE B = 50000;&lt;br&gt;&lt;br&gt;-- In query window 2&lt;br&gt;BEGIN TRAN;&lt;br&gt;UPDATE T SET A = -1 FROM dbo.Temp AS T WITH (INDEX(i1)) WHERE B = 50001;&lt;br&gt;&lt;br&gt;-- The above blocks trying to grab a page-level &amp;nbsp; update lock on the index.&lt;br&gt;&lt;br&gt;-- In query window 3&lt;br&gt;UPDATE T SET A = -1 FROM dbo.Temp AS T WITH (HOLDLOCK, INDEX(i2)) WHERE B = 50001;&lt;br&gt;&lt;br&gt;-- This succeeds!&lt;br&gt;&lt;br&gt;I know it's a fairly out-there example, but I bet someone is using it...!&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;&lt;br&gt;Paul</description></item><item><title>Recent Faves Tagged With &amp;quot;tlogs&amp;quot; : MyNetFaves</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/29/1233.aspx#1536</link><pubDate>Sun, 17 May 2009 13:20:25 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1536</guid><dc:creator>Anonymous</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://www.mynetfaves.com/tags/tlogs"&gt;http://www.mynetfaves.com/tags/tlogs&lt;/a&gt;</description></item><item><title>How earn $ 1000 a week?</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/29/1233.aspx#1565</link><pubDate>Fri, 05 Mar 2010 16:25:59 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1565</guid><dc:creator>AleVaserman</dc:creator><description>You can earn from 3000$-5000$ a Month with this program!&lt;br&gt;You will make money from from multiple streams: people search engine, ClickBank, HD Publishing, Google AdSense, HostGator, My Life and GDI (Global Domain International). &lt;br&gt;Visit site: [url=&lt;a rel="nofollow" target="_new" href="http://bit.ly/aLNyID"&gt;http://bit.ly/aLNyID&lt;/a&gt;]acme-people-search.com[/url]</description></item></channel></rss>