
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CHizSTudio &#187; tablespace</title>
	<atom:link href="http://www.chizstudio.com/tags/tablespace/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chizstudio.com</link>
	<description>Lazy Trend Hunter&#039;s Digital life - Make your happy digital life</description>
	<lastBuildDate>Fri, 23 Apr 2010 03:32:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>table data size on oracle</title>
		<link>http://www.chizstudio.com/table-data-size-on-oracle/</link>
		<comments>http://www.chizstudio.com/table-data-size-on-oracle/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 01:51:53 +0000</pubDate>
		<dc:creator>sayo</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[tablespace]]></category>

		<guid isPermaLink="false">http://www.chizstudio.com/?p=94</guid>
		<description><![CDATA[1. script
/*
** Table Data Size를 정확히 계산해주는 스크립트. &#60;&#60;박제용&#62;&#62;
**
** 사용법 : @tab_size [table_name]
**
*/
analyze table &#38;1 delete statistics;
analyze table &#38;1 compute statistics;
SELECT GREATEST(4, ceil(NUM_ROWS/
( (round(((1958-(INI_TRANS*23))*((100-PCT_FREE)/100))/AVG_ROW_LEN)))) * 2048) TableSize_Kbytes
FROM user_tables
WHERE table_name = upper(&#8216;&#38;1&#8242;);
2. p-sql
[Oracle] TABLE, INDEX 실 데이터 size 구하기
 
TABLE size 구하기
set pagesize 9999
col owner format a10
col tablespace_name format a20
col table_name format a30
col mb format 99990.99
SELECT [...]]]></description>
			<content:encoded><![CDATA[<p>1. script</p>
<p>/*<br />
** Table Data Size를 정확히 계산해주는 스크립트. &lt;&lt;박제용&gt;&gt;<br />
**<br />
** 사용법 : @tab_size [table_name]<br />
**<br />
*/<br />
analyze table &amp;1 delete statistics;<br />
analyze table &amp;1 compute statistics;</p>
<p>SELECT GREATEST(4, ceil(NUM_ROWS/<br />
( (round(((1958-(INI_TRANS*23))*((100-PCT_FREE)/100))/AVG_ROW_LEN)))) * 2048) TableSize_Kbytes<br />
FROM user_tables<br />
WHERE table_name = upper(&#8216;&amp;1&#8242;);</p>
<p>2. p-sql</p>
<p><a style="color: #6666cc; font-family: verdana, arial, sans-serif; font-size: 12px; text-decoration: none; font-weight: bold;" title="[Oracle] TABLE, INDEX 실 데이터 size 구하기" href="http://www.sung-ho.pe.kr/index.php?p=17947" target="_self"><strong>[Oracle] TABLE, INDEX 실 데이터 size 구하기</strong></a></p>
<p><strong> </strong></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">TABLE size 구하기</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">set pagesize 9999</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col owner format a10</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col tablespace_name format a20</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col table_name format a30</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col mb format 99990.99</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SELECT OWNER, TABLESPACE_NAME, TABLE_NAME, NUM_ROWS*AVG_ROW_LEN/1024/1024 as MB</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">FROM DBA_TABLES</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">WHERE OWNER IN (&#8216;ADPORTAL&#8217;,'INTRADBA&#8217;,'UWDBA&#8217;,'WEBSALES&#8217;)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORDER BY OWNER, TABLESPACE_NAME, TABLE_NAME;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">INDEX size 구하기</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">db_block_size를 LEAF_BLOCKS과 곱한다</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">select value from v$parameter where name = &#8216;db_block_size&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">set pagesize 9999</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col owner format a10</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col tablespace_name format a20</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col index_name format a30</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">col mb format 99990.99</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SELECT OWNER, TABLESPACE_NAME, INDEX_NAME, LEAF_BLOCKS*8192/1024/1024 as MB</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">FROM DBA_INDEXES</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">WHERE OWNER IN (&#8216;ADPORTAL&#8217;,'INTRADBA&#8217;,'UWDBA&#8217;,'WEBSALES&#8217;)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 272px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORDER BY OWNER, TABLESPACE_NAME, INDEX_NAME;</div>
<pre class="brush: sql; ">

TABLE size 구하기
set pagesize 9999
col owner format a10
col tablespace_name format a20
col table_name format a30
col mb format 99990.99

SELECT OWNER, TABLESPACE_NAME, TABLE_NAME, NUM_ROWS*AVG_ROW_LEN/1024/1024 as MB
FROM DBA_TABLES
WHERE OWNER IN (&#039;ADPORTAL&#039;,&#039;INTRADBA&#039;,&#039;UWDBA&#039;,&#039;WEBSALES&#039;)
ORDER BY OWNER, TABLESPACE_NAME, TABLE_NAME;

INDEX size 구하기
db_block_size를 LEAF_BLOCKS과 곱한다
select value from v$parameter where name = &#039;db_block_size&#039;

set pagesize 9999
col owner format a10
col tablespace_name format a20
col index_name format a30
col mb format 99990.99

SELECT OWNER, TABLESPACE_NAME, INDEX_NAME, LEAF_BLOCKS*8192/1024/1024 as MB
FROM DBA_INDEXES
WHERE OWNER IN (&#039;ADPORTAL&#039;,&#039;INTRADBA&#039;,&#039;UWDBA&#039;,&#039;WEBSALES&#039;)
ORDER BY OWNER, TABLESPACE_NAME, INDEX_NAME;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chizstudio.com/table-data-size-on-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
