<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Observation &#8211; Effect of Clustered Index over Nonclustered Index</title>
	<atom:link href="http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #015 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-419680</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #015 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 09 Feb 2013 01:30:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-419680</guid>
		<description><![CDATA[[...] Observation – Effect of Clustered Index over Nonclustered Index [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Observation – Effect of Clustered Index over Nonclustered Index [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anil Singh</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-85193</link>
		<dc:creator><![CDATA[Anil Singh]]></dc:creator>
		<pubDate>Wed, 25 Aug 2010 07:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-85193</guid>
		<description><![CDATA[Hi Pinal,

Can you explain which time we use clustered index &amp; which time we use non-clustered index &amp; why?

Regards
Anil Singh]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Can you explain which time we use clustered index &amp; which time we use non-clustered index &amp; why?</p>
<p>Regards<br />
Anil Singh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashok Kumar</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-79080</link>
		<dc:creator><![CDATA[Ashok Kumar]]></dc:creator>
		<pubDate>Wed, 07 Jul 2010 12:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-79080</guid>
		<description><![CDATA[Hi Pinal,

Can you explain how clustered index work ? &amp; how to fetch the data from the table when table have clustered index ?


Regards,
Ashok]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Can you explain how clustered index work ? &amp; how to fetch the data from the table when table have clustered index ?</p>
<p>Regards,<br />
Ashok</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sajitha</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-65003</link>
		<dc:creator><![CDATA[Sajitha]]></dc:creator>
		<pubDate>Sun, 11 Apr 2010 13:10:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-65003</guid>
		<description><![CDATA[Hi All,
this is my question

Query 1:
SELECT d.*,e.* FROM Department d ,Employee e ;

This has clustered index scan on Employee and Department

Query 2:

SELECT d.*,e.* FROM Department d ,Employee e where d.dno=e.dno ;

this has clustered index scan on Employee  and clustered index seek on department. But the cost is greater than query 1 .

Pleease explain.

regards
sajitha]]></description>
		<content:encoded><![CDATA[<p>Hi All,<br />
this is my question</p>
<p>Query 1:<br />
SELECT d.*,e.* FROM Department d ,Employee e ;</p>
<p>This has clustered index scan on Employee and Department</p>
<p>Query 2:</p>
<p>SELECT d.*,e.* FROM Department d ,Employee e where d.dno=e.dno ;</p>
<p>this has clustered index scan on Employee  and clustered index seek on department. But the cost is greater than query 1 .</p>
<p>Pleease explain.</p>
<p>regards<br />
sajitha</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-55860</link>
		<dc:creator><![CDATA[Brian Tkatch]]></dc:creator>
		<pubDate>Mon, 14 Sep 2009 12:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-55860</guid>
		<description><![CDATA[@vego

A CLUSTERED INDEX stores the data of the TABLE itself according to the INDEX.

A non-CLUSTERED INDEX points to the CLUSTEREd INDEX.

IIUC, the speed increase for a CLUSTERED INDEX is when multiple records are returned that are consecutive in the INDEX. If the INDEX is CLUSTERED, the retrieval will be faster because it only has to check one area of the file, possibly one disk seek. A non-CLUSTERED INDEX is likely to have the data all over the data file, requiring more time for data retrieval.]]></description>
		<content:encoded><![CDATA[<p>@vego</p>
<p>A CLUSTERED INDEX stores the data of the TABLE itself according to the INDEX.</p>
<p>A non-CLUSTERED INDEX points to the CLUSTEREd INDEX.</p>
<p>IIUC, the speed increase for a CLUSTERED INDEX is when multiple records are returned that are consecutive in the INDEX. If the INDEX is CLUSTERED, the retrieval will be faster because it only has to check one area of the file, possibly one disk seek. A non-CLUSTERED INDEX is likely to have the data all over the data file, requiring more time for data retrieval.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vego</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-55845</link>
		<dc:creator><![CDATA[vego]]></dc:creator>
		<pubDate>Sun, 13 Sep 2009 17:44:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-55845</guid>
		<description><![CDATA[when we create a clustered index on a table it stores the data in the index table.
my question is, is it stores entire row data of all columns or only data of the column on which we created clustered index?

by using index, how it is going to fastren the retrieving data from a table?

in noncluster index, it does not stores the column data on which we created nc index.

my question is, how it is going to retrieve the data fast when we use nc index column in select and where condition?

i have little bit confusion on this topic. Please anybody clear my confusion. i am very greateful to u in this regard.

thank you,
vego]]></description>
		<content:encoded><![CDATA[<p>when we create a clustered index on a table it stores the data in the index table.<br />
my question is, is it stores entire row data of all columns or only data of the column on which we created clustered index?</p>
<p>by using index, how it is going to fastren the retrieving data from a table?</p>
<p>in noncluster index, it does not stores the column data on which we created nc index.</p>
<p>my question is, how it is going to retrieve the data fast when we use nc index column in select and where condition?</p>
<p>i have little bit confusion on this topic. Please anybody clear my confusion. i am very greateful to u in this regard.</p>
<p>thank you,<br />
vego</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Observation - Effect of Clustered Index over Nonclustered Index Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-47004</link>
		<dc:creator><![CDATA[SQL SERVER - Observation - Effect of Clustered Index over Nonclustered Index Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Sat, 21 Feb 2009 11:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-47004</guid>
		<description><![CDATA[[...] This article is re-write of my previous article SQL SERVER - Observation - Effect of Clustered Index over Nonclustered Index. I have received so many request that re-write it as it is little confusing. I am going to re-write [...]]]></description>
		<content:encoded><![CDATA[<p>[...] This article is re-write of my previous article SQL SERVER &#8211; Observation &#8211; Effect of Clustered Index over Nonclustered Index. I have received so many request that re-write it as it is little confusing. I am going to re-write [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikhil</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-46412</link>
		<dc:creator><![CDATA[Nikhil]]></dc:creator>
		<pubDate>Fri, 06 Feb 2009 21:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-46412</guid>
		<description><![CDATA[The reason for this behavior is :-

1. When you create a non-clust on a heap, it creates a B-tree with each node containing the [ non-clust keys + rowid ( i.e. the location of the data record )].

2. When you create a clust and a non-clust index on a table, it again creates a B-tree but with each node having [non-clust Key + clust key ] . Hence it did a seek, also can be termed as covering index in this case.

When you say non-clust index points to the clustered index that means its a bookmark lookup ( in 2000 terminology ).]]></description>
		<content:encoded><![CDATA[<p>The reason for this behavior is :-</p>
<p>1. When you create a non-clust on a heap, it creates a B-tree with each node containing the [ non-clust keys + rowid ( i.e. the location of the data record )].</p>
<p>2. When you create a clust and a non-clust index on a table, it again creates a B-tree but with each node having [non-clust Key + clust key ] . Hence it did a seek, also can be termed as covering index in this case.</p>
<p>When you say non-clust index points to the clustered index that means its a bookmark lookup ( in 2000 terminology ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amit</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-46379</link>
		<dc:creator><![CDATA[amit]]></dc:creator>
		<pubDate>Thu, 05 Feb 2009 20:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-46379</guid>
		<description><![CDATA[hmm ....Interesting ...... 

as per your article ... IMHO

observation: non-clustered index seek when a clustered index present, else a table scan

conclusion: when clustered index is introduced, it forces non-clustered index to map itself to Clustered index (internally) hence it&#039;s seek, else it is independent.

assumption: some relation has to be present between Clustered and Non-Clustered index.

I am not sure if the conclusion is correct based on assumption. I would love to test, but dont have the time right now ...... We need to take into account the cost of a table scan, non-clustered index seek etc ... by the Query optimizer. Selectivity of an index generally plays a role also. 

Has anybody tried this test on a table with say a 1000 rows instead of 5 ???? with almost unique data in last two columns ??]]></description>
		<content:encoded><![CDATA[<p>hmm &#8230;.Interesting &#8230;&#8230; </p>
<p>as per your article &#8230; IMHO</p>
<p>observation: non-clustered index seek when a clustered index present, else a table scan</p>
<p>conclusion: when clustered index is introduced, it forces non-clustered index to map itself to Clustered index (internally) hence it&#8217;s seek, else it is independent.</p>
<p>assumption: some relation has to be present between Clustered and Non-Clustered index.</p>
<p>I am not sure if the conclusion is correct based on assumption. I would love to test, but dont have the time right now &#8230;&#8230; We need to take into account the cost of a table scan, non-clustered index seek etc &#8230; by the Query optimizer. Selectivity of an index generally plays a role also. </p>
<p>Has anybody tried this test on a table with say a 1000 rows instead of 5 ???? with almost unique data in last two columns ??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish Jain</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-46351</link>
		<dc:creator><![CDATA[Ashish Jain]]></dc:creator>
		<pubDate>Thu, 05 Feb 2009 07:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-46351</guid>
		<description><![CDATA[I think there is some modification in the documnetation after Clean up code....

Interesting part of above execution plan is now both queries are using nonclustered index SEEK (in place of scan)]]></description>
		<content:encoded><![CDATA[<p>I think there is some modification in the documnetation after Clean up code&#8230;.</p>
<p>Interesting part of above execution plan is now both queries are using nonclustered index SEEK (in place of scan)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HG Humphrey</title>
		<link>http://blog.sqlauthority.com/2009/02/04/sql-server-observation-effect-of-clustered-index-over-nonclustered-index/#comment-46332</link>
		<dc:creator><![CDATA[HG Humphrey]]></dc:creator>
		<pubDate>Wed, 04 Feb 2009 21:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2255#comment-46332</guid>
		<description><![CDATA[With the NC index and without the Clustered index, the 1st query is a table scan and the 2nd query has an index seek.

When I add the clustered index, both queries are an index seek.

According to your documentation, both queries do an index seek with the NC index and without the CL index.]]></description>
		<content:encoded><![CDATA[<p>With the NC index and without the Clustered index, the 1st query is a table scan and the 2nd query has an index seek.</p>
<p>When I add the clustered index, both queries are an index seek.</p>
<p>According to your documentation, both queries do an index seek with the NC index and without the CL index.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
