<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>kwatog &#38; co.&#187; SQL Server</title>
	<atom:link href="http://kwatog.com/category/blog/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://kwatog.com</link>
	<description>tech notes and general nonsense</description>
	<lastBuildDate>Tue, 31 Jan 2012 06:27:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Force Table Scan in SQL Server/Sybase</title>
		<link>http://kwatog.com/blog/sql-server/force-tablescan-in-sqlserversybase/</link>
		<comments>http://kwatog.com/blog/sql-server/force-tablescan-in-sqlserversybase/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 08:00:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[sybase]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=376</guid>
		<description><![CDATA[When extracting whole tables or large recordsets (say, at least 80% of the table), it is better to use Full Table Scan than use index. Full scan is more efficient in this case because it no longer need to search through the index for each record. It doesn&#8217;t need to because the whole table is [...]]]></description>
			<content:encoded><![CDATA[<p>When extracting whole tables or large recordsets (say, at least 80% of the table), it is better to use <strong>Full Table Scan</strong> than use index. Full scan is more efficient in this case because it no longer need to search through the index for each record. It doesn&#8217;t need to because the whole table is going to be extracted anyways.<br />
<span id="more-376"></span><br />
However, you need to tell SQL Server that you want to use full table scan. Otherwise, it will use an index depending on the where clause or join criteria you have on your query. </p>
<p><strong>Force Table Scan Syntax</strong><br />
<code>SELECT memberID, fname, lname<br />
 FROM members <strong>WITH (INDEX(0)) </strong><br />
 WHERE dept_cd = 100<br />
</code></p>
<p><code>SELECT dept_name, memberID, fname, lname<br />
 FROM  members <strong>WITH (INDEX(0)) </strong><br />
          ,department <strong>WITH (INDEX(0)) </strong><br />
  WHERE members.dept_cd = department.dept_cd<br />
</code></p>
<p>By the way, some DBAs are not aware of this (force table scan). I&#8217;m not a DBA but I worked on a lot of performance optimization projects before and has always been working with our DBAs. Their usual advice is to use the index which is correct in most cases. However, I think some of our queries should have use a force table scan to be more efficient. </p>
<h4>Incoming search terms:</h4><ul><li>sql server force table scan</li><li>sql server force full table scan</li><li>FORCE TABLE SCAN</li><li>sql server table scan force</li><li>table scan in sql server</li><li>sybase Forcing the query to use a table scan</li><li>sybase tablescan taking longer</li><li>sql server full table scans</li><li>sql server select force table scan</li><li>sql server table scan</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/sql-server/force-tablescan-in-sqlserversybase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Determine SQL Server Version</title>
		<link>http://kwatog.com/blog/sql-server/how-to-determine-sqlserver-version/</link>
		<comments>http://kwatog.com/blog/sql-server/how-to-determine-sqlserver-version/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 10:42:57 +0000</pubDate>
		<dc:creator>kwatog</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=81</guid>
		<description><![CDATA[In case you need to know what version of SQL Server you are currently using, you can use the queries below. Starting at SQL Server 2000, you can use the following query. SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition') The above query is applicable for SQL Server 2000, SQL Server 2005 and SQL Server 2008. For [...]]]></description>
			<content:encoded><![CDATA[<p>
In case you need to know what version of SQL Server you are currently using, you can use the queries below.
</p>
<p>
Starting at SQL Server 2000, you can use the following query.
</p>
<p><code>SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')</code></p>
<p>
The above query is applicable for SQL Server 2000, SQL Server 2005 and SQL Server 2008. For SQL Server 7 and SQL Server 6.5 series. The code below should be used.
</p>
<p><code>SELECT @@VERSION</code></p>
<p>
If you are not sure what version of SQL Server you have, use the second query. It still works as it isn&#8217;t deprecated yet. The new version is handy if you need to get the details programmatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/sql-server/how-to-determine-sqlserver-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!--
Hyper cache file: 5d90c3f1e61d153ce8604055a9bd496c
Cache created: 07-02-2012 18:45:19
HCE Version: 0.9.8
Load AVG: 0(5)
-->
