<?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: Not NULL</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2010/09/05/not-null/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Sun, 19 May 2013 12:40:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Log Buffer #202, A Carnival of The Vanities for DBAs</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-53801</link>
		<dc:creator><![CDATA[Log Buffer #202, A Carnival of The Vanities for DBAs]]></dc:creator>
		<pubDate>Tue, 26 Feb 2013 16:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-53801</guid>
		<description><![CDATA[[...] enticing features for the DBAs and the performance tuners, and so its no wonder that Jonathan Lewis re-discovers that not all &#8220;not null&#8221; are the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] enticing features for the DBAs and the performance tuners, and so its no wonder that Jonathan Lewis re-discovers that not all &#8220;not null&#8221; are the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37305</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 15 Sep 2010 08:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37305</guid>
		<description><![CDATA[Nigel,
Thank you; now corrected]]></description>
		<content:encoded><![CDATA[<p>Nigel,<br />
Thank you; now corrected</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37284</link>
		<dc:creator><![CDATA[Nigel]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 10:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37284</guid>
		<description><![CDATA[So is spelling &quot;language&quot; correctly!!!]]></description>
		<content:encoded><![CDATA[<p>So is spelling &#8220;language&#8221; correctly!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sokrates</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37274</link>
		<dc:creator><![CDATA[Sokrates]]></dc:creator>
		<pubDate>Mon, 13 Sep 2010 15:48:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37274</guid>
		<description><![CDATA[yes but orthography is also noteworthy]]></description>
		<content:encoded><![CDATA[<p>yes but orthography is also noteworthy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37273</link>
		<dc:creator><![CDATA[Nigel]]></dc:creator>
		<pubDate>Mon, 13 Sep 2010 12:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37273</guid>
		<description><![CDATA[&quot;the importance of being very careful with lnaguage&quot;

;)]]></description>
		<content:encoded><![CDATA[<p>&#8220;the importance of being very careful with lnaguage&#8221;</p>
<p>;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37232</link>
		<dc:creator><![CDATA[Stefan]]></dc:creator>
		<pubDate>Tue, 07 Sep 2010 22:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37232</guid>
		<description><![CDATA[but I should have tested the exact topic at question, not with another type of constraint 
I tested and it doesn&#039;t work like that with not null constraints, exchange fails with check constraint mismatch or type mismatch depending on intial not null check or declaration(why it worked above in my case, the remaining index ...)

however I like to mention, upon disabling a not null declared column via the system generated constraint name, then the nullable flag is set to Y. Upon reenabling it is back there to N. (also null$ switches from 1 to 0 to 1) So the &quot;declarative&quot; nature of the constraint must be stored somewhere as well, I just do not know where.
(10.2.0.4)]]></description>
		<content:encoded><![CDATA[<p>but I should have tested the exact topic at question, not with another type of constraint<br />
I tested and it doesn&#8217;t work like that with not null constraints, exchange fails with check constraint mismatch or type mismatch depending on intial not null check or declaration(why it worked above in my case, the remaining index &#8230;)</p>
<p>however I like to mention, upon disabling a not null declared column via the system generated constraint name, then the nullable flag is set to Y. Upon reenabling it is back there to N. (also null$ switches from 1 to 0 to 1) So the &#8220;declarative&#8221; nature of the constraint must be stored somewhere as well, I just do not know where.<br />
(10.2.0.4)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37230</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 07 Sep 2010 17:52:20 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37230</guid>
		<description><![CDATA[Stefan

Nice thought. 

It&#039;s always a good idea to ask the question: &quot;can I think of any circumstances which explain why feature X does not behave the way I might expect?&quot; You&#039;ve certainly found an area that&#039;s worth looking at a little more closely by doing exactly that.]]></description>
		<content:encoded><![CDATA[<p>Stefan</p>
<p>Nice thought. </p>
<p>It&#8217;s always a good idea to ask the question: &#8220;can I think of any circumstances which explain why feature X does not behave the way I might expect?&#8221; You&#8217;ve certainly found an area that&#8217;s worth looking at a little more closely by doing exactly that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37226</link>
		<dc:creator><![CDATA[Stefan]]></dc:creator>
		<pubDate>Tue, 07 Sep 2010 15:58:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37226</guid>
		<description><![CDATA[considering the potential impact of 
 
   alter table test enable novalidate constraint test_pk
   followed by
   alter table part_tab exchange partition p_max with table test without validation 

might be one of the reasons not to rely on constraint information on a follwing select count(*)

at least with primary key constraints (ok I probably should have sticked to the not null constraints) the &#039;NOT VALIDATE&#039; on the table seems not to be transfered to user_constraints of the partitioned table.]]></description>
		<content:encoded><![CDATA[<p>considering the potential impact of </p>
<p>   alter table test enable novalidate constraint test_pk<br />
   followed by<br />
   alter table part_tab exchange partition p_max with table test without validation </p>
<p>might be one of the reasons not to rely on constraint information on a follwing select count(*)</p>
<p>at least with primary key constraints (ok I probably should have sticked to the not null constraints) the &#8216;NOT VALIDATE&#8217; on the table seems not to be transfered to user_constraints of the partitioned table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sokrates</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37209</link>
		<dc:creator><![CDATA[Sokrates]]></dc:creator>
		<pubDate>Mon, 06 Sep 2010 09:49:18 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37209</guid>
		<description><![CDATA[cmp. also the discussion on this topic on http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2665514800346181577#2666583500346063752

I find it interesting to mention that since the use of LNNVL is now officially supported, one could also specify a not-null-constraint for example via
alter table t1 add constraint ch_on_nn check(lnnvl(object_name is null));

(works at least in 11.2)]]></description>
		<content:encoded><![CDATA[<p>cmp. also the discussion on this topic on <a href="http://asktom.oracle.com/pls/apex/f?p=100:11:0" rel="nofollow">http://asktom.oracle.com/pls/apex/f?p=100:11:0</a>::::P11_QUESTION_ID:2665514800346181577#2666583500346063752</p>
<p>I find it interesting to mention that since the use of LNNVL is now officially supported, one could also specify a not-null-constraint for example via<br />
alter table t1 add constraint ch_on_nn check(lnnvl(object_name is null));</p>
<p>(works at least in 11.2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bhavik Desai</title>
		<link>http://jonathanlewis.wordpress.com/2010/09/05/not-null/#comment-37204</link>
		<dc:creator><![CDATA[Bhavik Desai]]></dc:creator>
		<pubDate>Mon, 06 Sep 2010 06:52:15 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=4417#comment-37204</guid>
		<description><![CDATA[Interesting test !


Constraint
Name                           C SEARCH_CONDITION                                                                 STATUS   DEFERRABLE     DEFERRED  VALIDATED     GENERATED
------------------------------ - -------------------------------------------------------------------------------- -------- -------------- --------- ------------- --------------
SYS_C002299687                 C &quot;OBJECT_NAME&quot; IS NOT NULL                                                        ENABLED  NOT DEFERRABLE IMMEDIATE VALIDATED     GENERATED NAME ---&gt;

Constraint
Name                           C SEARCH_CONDITION                                                                 STATUS   DEFERRABLE     DEFERRED  VALIDATED     GENERATED
------------------------------ - -------------------------------------------------------------------------------- -------- -------------- --------- ------------- --------------
T1_CK_ON_NN                    C object_name is not null                                                          ENABLED  NOT DEFERRABLE IMMEDIATE VALIDATED     USER NAME     ---&gt;

Does that mean,CBO only considers IMPLICIT CHECK constraint (dba_constraints.generated=&#039;GENERATED NAME&#039;) and does not look at EXPLICIT check constraint (dba_constraints.generated=&#039;USER NAME&#039;)while deciding index access ?

Even in case of explicit check constraint (T1_CK_ON_NN), CBO has surety that index does not contain any NULL values and thus it should use the index...isn&#039;t it ?

Is this a BUG or expected behavior ?]]></description>
		<content:encoded><![CDATA[<p>Interesting test !</p>
<p>Constraint<br />
Name                           C SEARCH_CONDITION                                                                 STATUS   DEFERRABLE     DEFERRED  VALIDATED     GENERATED<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211;<br />
SYS_C002299687                 C &#8220;OBJECT_NAME&#8221; IS NOT NULL                                                        ENABLED  NOT DEFERRABLE IMMEDIATE VALIDATED     GENERATED NAME &#8212;&gt;</p>
<p>Constraint<br />
Name                           C SEARCH_CONDITION                                                                 STATUS   DEFERRABLE     DEFERRED  VALIDATED     GENERATED<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211;<br />
T1_CK_ON_NN                    C object_name is not null                                                          ENABLED  NOT DEFERRABLE IMMEDIATE VALIDATED     USER NAME     &#8212;&gt;</p>
<p>Does that mean,CBO only considers IMPLICIT CHECK constraint (dba_constraints.generated=&#8217;GENERATED NAME&#8217;) and does not look at EXPLICIT check constraint (dba_constraints.generated=&#8217;USER NAME&#8217;)while deciding index access ?</p>
<p>Even in case of explicit check constraint (T1_CK_ON_NN), CBO has surety that index does not contain any NULL values and thus it should use the index&#8230;isn&#8217;t it ?</p>
<p>Is this a BUG or expected behavior ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
