<?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; sybase</title>
	<atom:link href="http://kwatog.com/tag/sybase/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 forceindex</li><li>sql server full table scans</li><li>Sybase Table Scan vs Index</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>Oracle NVL Equivalent in MySQL</title>
		<link>http://kwatog.com/blog/mysql/oracle-nvl-equivalent-in-mysql/</link>
		<comments>http://kwatog.com/blog/mysql/oracle-nvl-equivalent-in-mysql/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 01:59:44 +0000</pubDate>
		<dc:creator>kwatog</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[isnull]]></category>
		<category><![CDATA[nvl]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sybase]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=204</guid>
		<description><![CDATA[Here&#8217;s the MySQL equivalent of Oracle&#8217;s NVL and MSSQL/Sybase&#8217;s ISNULL functions. Syntax IFNULL(expr1,expr2) Usage If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2. Take note that IFNULL() returns a numeric or string value, depending on the context in which it is used. I haven&#8217;t used it for other data types yet but [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the MySQL equivalent of Oracle&#8217;s NVL and MSSQL/Sybase&#8217;s ISNULL functions.</p>
<h3>Syntax</h3>
<p><code><br />
IFNULL(expr1,expr2)<br />
</code></p>
<h3>Usage</h3>
<p>If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2. Take note that IFNULL() returns a numeric or string value, depending on the context in which it is used. I haven&#8217;t used it for other data types yet but I reckon it would have the same results. That is to return the same data type as that of expr1. Another important thing to remember is that expr1 and expr2 should have the same data type</p>
<h4>Incoming search terms:</h4><ul><li>nvl mysql</li><li>mysql nvl equivalent</li><li>nvl in mysql</li><li>mysql nvl</li><li>oracle nvl mysql</li><li>nvl equivalent in mysql</li><li>mysql nvl equivalent function</li><li>mysql аналог nvl</li><li>oracle nvl</li><li>NVL Oracle</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/mysql/oracle-nvl-equivalent-in-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!--
Hyper cache file: b64b6183a25b550093f91998672e5d98
Cache created: 05-02-2012 02:39:42
HCE Version: 0.9.8
Load AVG: 0.09(5)
-->
