<?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: Row sizes 2</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Mon, 20 May 2013 17:10:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: raova</title>
		<link>http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/#comment-50606</link>
		<dc:creator><![CDATA[raova]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 15:26:38 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=9557#comment-50606</guid>
		<description><![CDATA[10.2.0.3 has this 255 column restriction on compression so we haven&#039;t tried that option.]]></description>
		<content:encoded><![CDATA[<p>10.2.0.3 has this 255 column restriction on compression so we haven&#8217;t tried that option.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernard</title>
		<link>http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/#comment-50605</link>
		<dc:creator><![CDATA[Bernard]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 14:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=9557#comment-50605</guid>
		<description><![CDATA[Table compression will reduce such a lists of null columns to about one byte for all of them.]]></description>
		<content:encoded><![CDATA[<p>Table compression will reduce such a lists of null columns to about one byte for all of them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/#comment-50603</link>
		<dc:creator><![CDATA[Timur Akhmadeev]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 12:51:52 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=9557#comment-50603</guid>
		<description><![CDATA[&lt;blockquote&gt;The &quot;optimizer lady” said auto_sample_size is as accurate as 100%&lt;/blockquote&gt;
... in Oracle version 11g or higher.]]></description>
		<content:encoded><![CDATA[<blockquote><p>The &#8220;optimizer lady” said auto_sample_size is as accurate as 100%</p></blockquote>
<p>&#8230; in Oracle version 11g or higher.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: guest</title>
		<link>http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/#comment-50591</link>
		<dc:creator><![CDATA[guest]]></dc:creator>
		<pubDate>Mon, 01 Oct 2012 17:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=9557#comment-50591</guid>
		<description><![CDATA[The &quot;optimizer lady&quot; said auto_sample_size is as accurate as 100%. Regardless, in this particular case, 95%+ accuracy is good enough for most people.]]></description>
		<content:encoded><![CDATA[<p>The &#8220;optimizer lady&#8221; said auto_sample_size is as accurate as 100%. Regardless, in this particular case, 95%+ accuracy is good enough for most people.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raova</title>
		<link>http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/#comment-50589</link>
		<dc:creator><![CDATA[raova]]></dc:creator>
		<pubDate>Mon, 01 Oct 2012 15:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=9557#comment-50589</guid>
		<description><![CDATA[May be true, provided the stats gather was done with 100% sample size to get an accurate value for num_nulls.]]></description>
		<content:encoded><![CDATA[<p>May be true, provided the stats gather was done with 100% sample size to get an accurate value for num_nulls.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: guest</title>
		<link>http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/#comment-50588</link>
		<dc:creator><![CDATA[guest]]></dc:creator>
		<pubDate>Mon, 01 Oct 2012 15:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=9557#comment-50588</guid>
		<description><![CDATA[An alternative approach to previous comment is if you were to run following query and create new order of columns, that would be just as good - provided you have gathered Statistics on the table. Then again, who doesn&#039;t gather stats on their tables now a days? :)

[sourcecode]
  SELECT table_name, column_name, column_id, num_nulls, num_distinct
    FROM all_tab_columns
   WHERE owner = :owner
     AND table_name = :table_name
ORDER BY num_nulls, column_id
[/sourcecode]]]></description>
		<content:encoded><![CDATA[<p>An alternative approach to previous comment is if you were to run following query and create new order of columns, that would be just as good &#8211; provided you have gathered Statistics on the table. Then again, who doesn&#8217;t gather stats on their tables now a days? :)</p>
<pre class="brush: plain; title: ; notranslate">
  SELECT table_name, column_name, column_id, num_nulls, num_distinct
    FROM all_tab_columns
   WHERE owner = :owner
     AND table_name = :table_name
ORDER BY num_nulls, column_id
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: raova</title>
		<link>http://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/#comment-50585</link>
		<dc:creator><![CDATA[raova]]></dc:creator>
		<pubDate>Mon, 01 Oct 2012 10:58:07 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=9557#comment-50585</guid>
		<description><![CDATA[Very nice article. We have done a similar analysis on our datawarehouse and carried out a column re-order excercise. 
we have saved 1.2TB of space (Tables + Indexes) from one of the data marts. We have arrived at new column order using different stratgy where we have got the number of nulls in each column and then did a CTAS of the original table with the new column order.

Here is the cut-down version of the steps we have performed.

&lt;pre&gt;select  /*+ parallel(x,16) */
count(decode(C1,null,1,null)) C1,
count(decode(C2,null,1,null)) C2,
count(decode(C3,null,1,null)) C3,
count(decode(C4,null,1,null)) C4,
count(decode(C5,null,1,null)) C5,
count(decode(C6,null,1,null)) C6,
count(decode(C7,null,1,null)) C7,
count(decode(C8,null,1,null)) C8,
count(decode(C9,null,1,null)) C9
from
T1 x
/
&lt;/pre&gt;

We have ordered the resulting counts in ascending order to arrive at the new column order (we have used excel to transpose the output and plot some graphs etc).

&lt;pre&gt;Column Name	Number of Nulls
C1		0
C8		0
C7		4763
C4		4763
C9		5230377
C6		11645479
C3		88483772
C5		252383865
C2		2028039667
&lt;/pre&gt;

Then we have CTAs&#039;ed the table with new column order.

The tables are huge and one of the table with 978 columns has gone down by 42% in size.

Ananda]]></description>
		<content:encoded><![CDATA[<p>Very nice article. We have done a similar analysis on our datawarehouse and carried out a column re-order excercise.<br />
we have saved 1.2TB of space (Tables + Indexes) from one of the data marts. We have arrived at new column order using different stratgy where we have got the number of nulls in each column and then did a CTAS of the original table with the new column order.</p>
<p>Here is the cut-down version of the steps we have performed.</p>
<pre>select  /*+ parallel(x,16) */
count(decode(C1,null,1,null)) C1,
count(decode(C2,null,1,null)) C2,
count(decode(C3,null,1,null)) C3,
count(decode(C4,null,1,null)) C4,
count(decode(C5,null,1,null)) C5,
count(decode(C6,null,1,null)) C6,
count(decode(C7,null,1,null)) C7,
count(decode(C8,null,1,null)) C8,
count(decode(C9,null,1,null)) C9
from
T1 x
/
</pre>
<p>We have ordered the resulting counts in ascending order to arrive at the new column order (we have used excel to transpose the output and plot some graphs etc).</p>
<pre>Column Name	Number of Nulls
C1		0
C8		0
C7		4763
C4		4763
C9		5230377
C6		11645479
C3		88483772
C5		252383865
C2		2028039667
</pre>
<p>Then we have CTAs&#8217;ed the table with new column order.</p>
<p>The tables are huge and one of the table with 978 columns has gone down by 42% in size.</p>
<p>Ananda</p>
]]></content:encoded>
	</item>
</channel>
</rss>
