 




<?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: Back To Basics: What&#8217;s the difference between a Scan and a Seek?</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/</link>
	<description></description>
	<lastBuildDate>Tue, 07 May 2013 13:39:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: BrianTkatch</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-292</link>
		<dc:creator>BrianTkatch</dc:creator>
		<pubDate>Thu, 24 Sep 2009 20:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-292</guid>
		<description><![CDATA[Thanx for the explanation. That was very helpful.]]></description>
		<content:encoded><![CDATA[<p>Thanx for the explanation. That was very helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrdenny</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-290</link>
		<dc:creator>mrdenny</dc:creator>
		<pubDate>Thu, 24 Sep 2009 19:41:02 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-290</guid>
		<description><![CDATA[If you have an ORDER BY on your query then yes.  If you don&#039;t have an ORDER BY, then the SQL Server will probably sort by the clustered index and use it for filtering.  If there is no clustered index it would then fall back to using the table itself and return the data in the order it comes across it.]]></description>
		<content:encoded><![CDATA[<p>If you have an ORDER BY on your query then yes.  If you don&#8217;t have an ORDER BY, then the SQL Server will probably sort by the clustered index and use it for filtering.  If there is no clustered index it would then fall back to using the table itself and return the data in the order it comes across it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BrianTkatch</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-286</link>
		<dc:creator>BrianTkatch</dc:creator>
		<pubDate>Wed, 23 Sep 2009 13:06:19 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-286</guid>
		<description><![CDATA[Ah, but reading the INDEX is always preferred because of the ordering, if that is required?]]></description>
		<content:encoded><![CDATA[<p>Ah, but reading the INDEX is always preferred because of the ordering, if that is required?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrdenny</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-284</link>
		<dc:creator>mrdenny</dc:creator>
		<pubDate>Tue, 22 Sep 2009 21:26:52 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-284</guid>
		<description><![CDATA[Sort of.  If the SQL Server decides that the most efficient method to access the data is a full table scan it will do so.  If there&#039;s no filter on the index, it&#039;ll figure out which index to use to sort the index.  If no index matches it&#039;ll use the clustered index.  If there&#039;s no clustered index then it&#039;ll use a table scan.]]></description>
		<content:encoded><![CDATA[<p>Sort of.  If the SQL Server decides that the most efficient method to access the data is a full table scan it will do so.  If there&#8217;s no filter on the index, it&#8217;ll figure out which index to use to sort the index.  If no index matches it&#8217;ll use the clustered index.  If there&#8217;s no clustered index then it&#8217;ll use a table scan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BrianTkatch</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-283</link>
		<dc:creator>BrianTkatch</dc:creator>
		<pubDate>Tue, 22 Sep 2009 19:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-283</guid>
		<description><![CDATA[OK, sorting, interesting. Is there then an equivalent equation to

IF time-to-read-index + time-to-fetch-table &gt; time-to-read-entire-table + time-to-sort THEN go directly to the TABLE; ELSE use the INDEX;

Or is it just use the INDEX unless the entire TABLE is requested?]]></description>
		<content:encoded><![CDATA[<p>OK, sorting, interesting. Is there then an equivalent equation to</p>
<p>IF time-to-read-index + time-to-fetch-table &gt; time-to-read-entire-table + time-to-sort THEN go directly to the TABLE; ELSE use the INDEX;</p>
<p>Or is it just use the INDEX unless the entire TABLE is requested?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrdenny</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-280</link>
		<dc:creator>mrdenny</dc:creator>
		<pubDate>Tue, 22 Sep 2009 18:51:37 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-280</guid>
		<description><![CDATA[You wouldn&#039;t want to hit the table directly because the columns in the table probably aren&#039;t sorted in the correct order.  Without knowing that the columns are in the correct order the SQL Server will go to the index which is presorted and quicker to search.]]></description>
		<content:encoded><![CDATA[<p>You wouldn&#8217;t want to hit the table directly because the columns in the table probably aren&#8217;t sorted in the correct order.  Without knowing that the columns are in the correct order the SQL Server will go to the index which is presorted and quicker to search.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BrianTkatch</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-278</link>
		<dc:creator>BrianTkatch</dc:creator>
		<pubDate>Tue, 22 Sep 2009 13:59:43 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-278</guid>
		<description><![CDATA[&quot;It is possible that it would, but not likely. The reason is that the table has other columns which you may or may not need in your query.&quot;

Denny, thanx for responding. I want to learn this.

If the only COLUMNs being pulled are those on the INDEX, an INDEX anything would be faster because there&#039;s less to read. But if other COLUMNs are used, it would have to hit the TABLE anyway. So, why not just go to the TABLE directly?

Isn&#039;t it simple logic/math?

IF time-to-read-index + time-to-fetch-table &gt; time-to-read-entire-table THEN go directly to the TABLE; ELSE use the INDEX;

Please expound on your comment. I have not got the point yet.]]></description>
		<content:encoded><![CDATA[<p>&#8220;It is possible that it would, but not likely. The reason is that the table has other columns which you may or may not need in your query.&#8221;</p>
<p>Denny, thanx for responding. I want to learn this.</p>
<p>If the only COLUMNs being pulled are those on the INDEX, an INDEX anything would be faster because there&#8217;s less to read. But if other COLUMNs are used, it would have to hit the TABLE anyway. So, why not just go to the TABLE directly?</p>
<p>Isn&#8217;t it simple logic/math?</p>
<p>IF time-to-read-index + time-to-fetch-table &gt; time-to-read-entire-table THEN go directly to the TABLE; ELSE use the INDEX;</p>
<p>Please expound on your comment. I have not got the point yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrdenny</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-276</link>
		<dc:creator>mrdenny</dc:creator>
		<pubDate>Thu, 17 Sep 2009 23:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-276</guid>
		<description><![CDATA[Brian,
It is possible that it would, but not likely.  The reason is that the table has other columns which you may or may not need in your query.  If there are a lot of other columns in your query the additional IO required to pull all those pages from disk, and then filtering them would almost always be slower then pulling a large number of records from an index.  

Especially when you consider than an Index seek doesn&#039;t need to load all the records of the index from disk.  It only needs to load the needed pages from disk (based on the statistics) to get the information required.]]></description>
		<content:encoded><![CDATA[<p>Brian,<br />
It is possible that it would, but not likely.  The reason is that the table has other columns which you may or may not need in your query.  If there are a lot of other columns in your query the additional IO required to pull all those pages from disk, and then filtering them would almost always be slower then pulling a large number of records from an index.  </p>
<p>Especially when you consider than an Index seek doesn&#8217;t need to load all the records of the index from disk.  It only needs to load the needed pages from disk (based on the statistics) to get the information required.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BrianTkatch</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-271</link>
		<dc:creator>BrianTkatch</dc:creator>
		<pubDate>Thu, 17 Sep 2009 13:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-271</guid>
		<description><![CDATA[Nice article.

Wouldn&#039;t a table scan better after a certain amount of data is required from the table?

typo: &quot;obsouly&quot;
typo: &quot;togo&quot;]]></description>
		<content:encoded><![CDATA[<p>Nice article.</p>
<p>Wouldn&#8217;t a table scan better after a certain amount of data is required from the table?</p>
<p>typo: &#8220;obsouly&#8221;<br />
typo: &#8220;togo&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mrdenny</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-132</link>
		<dc:creator>Mrdenny</dc:creator>
		<pubDate>Mon, 24 Nov 2008 23:51:42 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/#comment-132</guid>
		<description><![CDATA[Your right, I somehow managed to get those backwards.

Thanks for pointing that out.  I&#039;ll get them in the correct order in just a second.]]></description>
		<content:encoded><![CDATA[<p>Your right, I somehow managed to get those backwards.</p>
<p>Thanks for pointing that out.  I&#8217;ll get them in the correct order in just a second.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
