<?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: Constraints, Inserts and bind</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Wed, 22 May 2013 12:40:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: latch: row cache objects &#171; Oracle</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-44670</link>
		<dc:creator><![CDATA[latch: row cache objects &#171; Oracle]]></dc:creator>
		<pubDate>Wed, 25 Jan 2012 22:07:08 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-44670</guid>
		<description><![CDATA[[...] As usual my master comes to the rescue with this note &#8211; Constraints, Inserts and bind [...]]]></description>
		<content:encoded><![CDATA[<p>[...] As usual my master comes to the rescue with this note &#8211; Constraints, Inserts and bind [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-13785</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 28 Jun 2007 10:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-13785</guid>
		<description><![CDATA[Robert, since 9i the optimizer has been able to combine existing predicates with constraints to generate new predicates. I suspect you have a constraint on column &lt;b&gt;n1&lt;/b&gt; that is being read each time you optimise a new query. The scale of activity is much less for queries, though, as it only applies to the &lt;b&gt;where&lt;/b&gt; clauses, not to every column in the table.]]></description>
		<content:encoded><![CDATA[<p>Robert, since 9i the optimizer has been able to combine existing predicates with constraints to generate new predicates. I suspect you have a constraint on column <b>n1</b> that is being read each time you optimise a new query. The scale of activity is much less for queries, though, as it only applies to the <b>where</b> clauses, not to every column in the table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Winter</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-13769</link>
		<dc:creator><![CDATA[Robert Winter]]></dc:creator>
		<pubDate>Thu, 28 Jun 2007 02:30:48 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-13769</guid>
		<description><![CDATA[I tried a similar test with SELECT and saw the same thing going on with cdef$.  I can understand needing the constraint during an insert, but why does Oracle need it during a query?  I&#039;m running 10.2.0.3 on Solaris SPARC.
declare
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;n1 number;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;v1 varchar2(10);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;v_cmd varchar2(256);
begin
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;for i in 1..1000 loop
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;v_cmd := &#039;select n1, v1 from t1 where n1 = &#039; &#124;&#124; i;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;execute immediate v_cmd into n1, v1;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;end loop;
end;
/
]]></description>
		<content:encoded><![CDATA[<p>I tried a similar test with SELECT and saw the same thing going on with cdef$.  I can understand needing the constraint during an insert, but why does Oracle need it during a query?  I&#8217;m running 10.2.0.3 on Solaris SPARC.<br />
declare<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n1 number;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v1 varchar2(10);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v_cmd varchar2(256);<br />
begin<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for i in 1..1000 loop<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v_cmd := &#8216;select n1, v1 from t1 where n1 = &#8216; || i;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;execute immediate v_cmd into n1, v1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end loop;<br />
end;<br />
/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Bucata</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-573</link>
		<dc:creator><![CDATA[Jason Bucata]]></dc:creator>
		<pubDate>Mon, 18 Dec 2006 15:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-573</guid>
		<description><![CDATA[I generally agree that it&#039;s a worthwhile use of memory.  My current job has me thinking a lot about the shared pool, since we&#039;ve got a lot of shared pool pressure, so that&#039;s just something I&#039;ve started glomming onto...]]></description>
		<content:encoded><![CDATA[<p>I generally agree that it&#8217;s a worthwhile use of memory.  My current job has me thinking a lot about the shared pool, since we&#8217;ve got a lot of shared pool pressure, so that&#8217;s just something I&#8217;ve started glomming onto&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed Jaffar Hussain</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-493</link>
		<dc:creator><![CDATA[Syed Jaffar Hussain]]></dc:creator>
		<pubDate>Fri, 15 Dec 2006 19:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-493</guid>
		<description><![CDATA[Thanks for clarification. I got it.

Jaffar]]></description>
		<content:encoded><![CDATA[<p>Thanks for clarification. I got it.</p>
<p>Jaffar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-491</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Fri, 15 Dec 2006 18:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-491</guid>
		<description><![CDATA[Jaffar, the &lt;b&gt;long&lt;/b&gt; column in question is the &lt;b&gt;definition&lt;/b&gt; column of &lt;b&gt;cdef$&lt;/b&gt;. It has nothing to do with the type of the column in the user&#039;s table.]]></description>
		<content:encoded><![CDATA[<p>Jaffar, the <b>long</b> column in question is the <b>definition</b> column of <b>cdef$</b>. It has nothing to do with the type of the column in the user&#8217;s table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed Jaffar Hussain</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-489</link>
		<dc:creator><![CDATA[Syed Jaffar Hussain]]></dc:creator>
		<pubDate>Fri, 15 Dec 2006 18:22:44 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-489</guid>
		<description><![CDATA[Jonathan, 

A small confusion in your example, you define column v1 datatype as varchar, but, you say, 

&gt;&gt;Oracle doesn’t keep long columns cached in the dictionary cache (rowcache)

Is this same with column have other datatype than long?

Jaffar]]></description>
		<content:encoded><![CDATA[<p>Jonathan, </p>
<p>A small confusion in your example, you define column v1 datatype as varchar, but, you say, </p>
<p>&gt;&gt;Oracle doesn’t keep long columns cached in the dictionary cache (rowcache)</p>
<p>Is this same with column have other datatype than long?</p>
<p>Jaffar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: globelovers</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-487</link>
		<dc:creator><![CDATA[globelovers]]></dc:creator>
		<pubDate>Fri, 15 Dec 2006 18:00:58 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-487</guid>
		<description><![CDATA[support!]]></description>
		<content:encoded><![CDATA[<p>support!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-466</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Fri, 15 Dec 2006 07:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-466</guid>
		<description><![CDATA[Jason, Good question.

create table t1 (n1 number check (n1 = 1), ...
for 255 columns.
insert /*+ tagged */ into t1 values (1,1,1...)
for 255 columns.
Track down the SQL statement in query &lt;b&gt;v$db_object_cache&lt;/b&gt; to check the shared memory:  

select sharable_mem, name 
from v$db_object_cache 
where name like &#039;%tagged%&#039;
and name not like &#039;%db_object_cache%&#039;
;

A test with 255 constraints in place used 170KB of memory, repeated without constraints the demand was 80KB.

Worth knowing about the extra memory requirements - on the other hand I&#039;d rather use the memory than allow the data to be wrong.]]></description>
		<content:encoded><![CDATA[<p>Jason, Good question.</p>
<p>create table t1 (n1 number check (n1 = 1), &#8230;<br />
for 255 columns.<br />
insert /*+ tagged */ into t1 values (1,1,1&#8230;)<br />
for 255 columns.<br />
Track down the SQL statement in query <b>v$db_object_cache</b> to check the shared memory:  </p>
<p>select sharable_mem, name<br />
from v$db_object_cache<br />
where name like &#8216;%tagged%&#8217;<br />
and name not like &#8216;%db_object_cache%&#8217;<br />
;</p>
<p>A test with 255 constraints in place used 170KB of memory, repeated without constraints the demand was 80KB.</p>
<p>Worth knowing about the extra memory requirements &#8211; on the other hand I&#8217;d rather use the memory than allow the data to be wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Bucata</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-460</link>
		<dc:creator><![CDATA[Jason Bucata]]></dc:creator>
		<pubDate>Thu, 14 Dec 2006 23:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/14/constraints-inserts-and-bind/#comment-460</guid>
		<description><![CDATA[So does that imply that the parsed version of the SQL statement has keep the information about all the constraints that that statement could possibly trip--if it doesn&#039;t look at cdef$ again each time it&#039;s run?

For a table with a lot of constraints, couldn&#039;t that get big?]]></description>
		<content:encoded><![CDATA[<p>So does that imply that the parsed version of the SQL statement has keep the information about all the constraints that that statement could possibly trip&#8211;if it doesn&#8217;t look at cdef$ again each time it&#8217;s run?</p>
<p>For a table with a lot of constraints, couldn&#8217;t that get big?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
