<?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: FBI oddities</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2010/12/16/fbi-oddities/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2010/12/16/fbi-oddities/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Thu, 23 May 2013 12:47:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/12/16/fbi-oddities/#comment-38812</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 21 Dec 2010 08:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5249#comment-38812</guid>
		<description><![CDATA[Mohamed,

I think the important point in your comment is that it emphasises the need to think carefully about the impact on NULL on such things. 

Whether your suggestion was appropriate or not (as Olekander suggests) is completely down to the business requirements - but it&#039;s the technicians who have to remember that NULL can turn a simple business request into something a little more complex than first thought.]]></description>
		<content:encoded><![CDATA[<p>Mohamed,</p>
<p>I think the important point in your comment is that it emphasises the need to think carefully about the impact on NULL on such things. </p>
<p>Whether your suggestion was appropriate or not (as Olekander suggests) is completely down to the business requirements &#8211; but it&#8217;s the technicians who have to remember that NULL can turn a simple business request into something a little more complex than first thought.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: al0</title>
		<link>http://jonathanlewis.wordpress.com/2010/12/16/fbi-oddities/#comment-38770</link>
		<dc:creator><![CDATA[al0]]></dc:creator>
		<pubDate>Fri, 17 Dec 2010 09:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5249#comment-38770</guid>
		<description><![CDATA[Hi Mohamed,

Your code treats NULL state exactly the same way as &#039;CLOSED&#039; state, which unlikely to be a desired behavior.

Regards,
Oleksandr]]></description>
		<content:encoded><![CDATA[<p>Hi Mohamed,</p>
<p>Your code treats NULL state exactly the same way as &#8216;CLOSED&#8217; state, which unlikely to be a desired behavior.</p>
<p>Regards,<br />
Oleksandr</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Houri Mohamed</title>
		<link>http://jonathanlewis.wordpress.com/2010/12/16/fbi-oddities/#comment-38768</link>
		<dc:creator><![CDATA[Houri Mohamed]]></dc:creator>
		<pubDate>Fri, 17 Dec 2010 09:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5249#comment-38768</guid>
		<description><![CDATA[Jonathan,

If state is allowed to be null, I would have slightly changed the index syntax creation (and the query accordingly) as follows:

create index t1_f3 on t1(case when nvl(state,&#039;CLOSED&#039;) = &#039;CLOSED&#039; then to_number(null) else n1 end);


select
	/*+ index(t1) t1_f3 */
	v1
from
	t1
where
	case when nvl(state,&#039;CLOSED&#039;) = &#039;CLOSED&#039; then to_number(null) else n1 end = 100;

Even if in this case it seems to be of no consequences in the query result 

What do you think?

Best Regards

Mohamed Houri]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>If state is allowed to be null, I would have slightly changed the index syntax creation (and the query accordingly) as follows:</p>
<p>create index t1_f3 on t1(case when nvl(state,&#8217;CLOSED&#8217;) = &#8216;CLOSED&#8217; then to_number(null) else n1 end);</p>
<p>select<br />
	/*+ index(t1) t1_f3 */<br />
	v1<br />
from<br />
	t1<br />
where<br />
	case when nvl(state,&#8217;CLOSED&#8217;) = &#8216;CLOSED&#8217; then to_number(null) else n1 end = 100;</p>
<p>Even if in this case it seems to be of no consequences in the query result </p>
<p>What do you think?</p>
<p>Best Regards</p>
<p>Mohamed Houri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Narendra</title>
		<link>http://jonathanlewis.wordpress.com/2010/12/16/fbi-oddities/#comment-38760</link>
		<dc:creator><![CDATA[Narendra]]></dc:creator>
		<pubDate>Fri, 17 Dec 2010 06:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5249#comment-38760</guid>
		<description><![CDATA[Jonathan,

Nice explanation and thanks, in particular, for mentioning the caveat about maintaining statistics on hidden columns of FBI.

p.s. you should have posted this as another quiz... :)]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>Nice explanation and thanks, in particular, for mentioning the caveat about maintaining statistics on hidden columns of FBI.</p>
<p>p.s. you should have posted this as another quiz&#8230; :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/12/16/fbi-oddities/#comment-38745</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 16 Dec 2010 18:49:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5249#comment-38745</guid>
		<description><![CDATA[al0,

Valid point, given the specific example I&#039;ve shown; but doing it in the way I&#039;ve shown it addresses the more generic problem of indexing &quot;everything that isn&#039;t closed&quot;.]]></description>
		<content:encoded><![CDATA[<p>al0,</p>
<p>Valid point, given the specific example I&#8217;ve shown; but doing it in the way I&#8217;ve shown it addresses the more generic problem of indexing &#8220;everything that isn&#8217;t closed&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: al0</title>
		<link>http://jonathanlewis.wordpress.com/2010/12/16/fbi-oddities/#comment-38743</link>
		<dc:creator><![CDATA[al0]]></dc:creator>
		<pubDate>Thu, 16 Dec 2010 18:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5249#comment-38743</guid>
		<description><![CDATA[I wonder why not decode(state,&#039;OPEN,nl,null)]]></description>
		<content:encoded><![CDATA[<p>I wonder why not decode(state,&#8217;OPEN,nl,null)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
