<?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/"
		>
<channel>
	<title>Comments on: Why not the primary key?</title>
	<atom:link href="http://www.systemcall.org/blog/2008/04/why-not-the-primary-key/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.systemcall.org/blog/2008/04/why-not-the-primary-key/</link>
	<description>Security, development and a bit of madness</description>
	<lastBuildDate>Mon, 09 Jan 2012 22:48:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: rengolin</title>
		<link>http://www.systemcall.org/blog/2008/04/why-not-the-primary-key/comment-page-1/#comment-164</link>
		<dc:creator>rengolin</dc:creator>
		<pubDate>Mon, 28 Apr 2008 13:23:24 +0000</pubDate>
		<guid isPermaLink="false">http://systemcall.org/2008/04/23/why-not-the-primary-key/#comment-164</guid>
		<description>&gt; In a Tablespace with 8k block size and the avg row length of a 100 bytes you could fit in about 80 records in one data block.

If you have a few rows it shouldn&#039;t matter anyway (both index and data are small enough to fit in a few cache pages) and if you have millions of rows, dividing the scan by 80 won&#039;t make much difference over a binary search (ie. millions/80 is still *much* bigger than log(millions) ).

My table had 74 millions of rows and only 74 had the ID I wanted (nice coincidence). ;)

&gt; But why don’t they gather system statistics?

Good question...</description>
		<content:encoded><![CDATA[<p>&gt; In a Tablespace with 8k block size and the avg row length of a 100 bytes you could fit in about 80 records in one data block.</p>
<p>If you have a few rows it shouldn&#8217;t matter anyway (both index and data are small enough to fit in a few cache pages) and if you have millions of rows, dividing the scan by 80 won&#8217;t make much difference over a binary search (ie. millions/80 is still *much* bigger than log(millions) ).</p>
<p>My table had 74 millions of rows and only 74 had the ID I wanted (nice coincidence). <img src='http://www.systemcall.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>&gt; But why don’t they gather system statistics?</p>
<p>Good question&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bide</title>
		<link>http://www.systemcall.org/blog/2008/04/why-not-the-primary-key/comment-page-1/#comment-163</link>
		<dc:creator>Bide</dc:creator>
		<pubDate>Mon, 28 Apr 2008 08:39:09 +0000</pubDate>
		<guid isPermaLink="false">http://systemcall.org/2008/04/23/why-not-the-primary-key/#comment-163</guid>
		<description>&gt; &quot;Let’s face it, the first scenario is just too extreme to be true&quot;

I don&#039;t think scenario one is that uncommon, think of a small look-up/CV table. In a Tablespace with 8k block size and the avg row length of a 100 bytes you could fit in about 80 records in one data block.

&gt; &quot;I don’t quite understand what they really mean to Oracle but index_caching = 0 seems a bit too radical for me to make it default.&quot;

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1137.htm#1021404
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1138.htm#1021444
Of course there is much more that factors in for the Optimizer&#039;s decision, most importantly object statistics.
I agree that the default values for these two parameters are badly chosen (I&#039;d say for 99% of all Oracle shops). But why don&#039;t they gather system statistics?</description>
		<content:encoded><![CDATA[<p>&gt; &#8220;Let’s face it, the first scenario is just too extreme to be true&#8221;</p>
<p>I don&#8217;t think scenario one is that uncommon, think of a small look-up/CV table. In a Tablespace with 8k block size and the avg row length of a 100 bytes you could fit in about 80 records in one data block.</p>
<p>&gt; &#8220;I don’t quite understand what they really mean to Oracle but index_caching = 0 seems a bit too radical for me to make it default.&#8221;</p>
<p><a href="http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1137.htm#1021404" rel="nofollow">http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1137.htm#1021404</a><br />
<a href="http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1138.htm#1021444" rel="nofollow">http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1138.htm#1021444</a><br />
Of course there is much more that factors in for the Optimizer&#8217;s decision, most importantly object statistics.<br />
I agree that the default values for these two parameters are badly chosen (I&#8217;d say for 99% of all Oracle shops). But why don&#8217;t they gather system statistics?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo Castro</title>
		<link>http://www.systemcall.org/blog/2008/04/why-not-the-primary-key/comment-page-1/#comment-162</link>
		<dc:creator>Rodrigo Castro</dc:creator>
		<pubDate>Wed, 23 Apr 2008 19:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://systemcall.org/2008/04/23/why-not-the-primary-key/#comment-162</guid>
		<description>Actually you can get this kind of answer all the time, because people blindly believe that some application/companies have always some good reason to do their products in a given way. From my experience (and probably from yours too), we know that sometimes things do not have any reason to be done that way or maybe the reason is completely unrelated to what one would expect, so being skeptical (and never religious about products/companies) sounds as the best way to me.</description>
		<content:encoded><![CDATA[<p>Actually you can get this kind of answer all the time, because people blindly believe that some application/companies have always some good reason to do their products in a given way. From my experience (and probably from yours too), we know that sometimes things do not have any reason to be done that way or maybe the reason is completely unrelated to what one would expect, so being skeptical (and never religious about products/companies) sounds as the best way to me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

