_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › 企ろ伎れ伎螻

Contents

1 TABLE SIZE 螻 螻旧(ORACLE BLOCK SIZE : 2K 襦 螳)
2 INDEX SIZE 螻 螻旧


1 TABLE SIZE 螻 螻旧(ORACLE BLOCK SIZE : 2K 襦 螳) #

$ sqlplus scott/tiger
SQL> SELECT   GREATEST(4, ceil(ROW_COUNT /
              ((round(((1958 - (initrans * 23)) *
              ((100 - PCTFREE) /100)) / ADJ_ROW_SIZE)))) * BLOCK_SIZE)
              TableSize_Kbytes
     FROM dual;

*.  螳 BLOCK Available  Bytes - 1958
*. 螳 initrans  23 Bytes
*. PCT_FREE : Table  pctfree 螳(default 10)
*. ADJ_ROW_SIZE : 螳 row  蠏 SIZE 豢豺 
*. ROW_COUNT : table  row  螳 
*. BLOCK_SIZE : 1 block 蠍 (: K)

) table 企 EMP  蟆曙

ROW_COUNT : select count(*) from emp;

ADJ_ROW_SIZE : analyze table emp compute statistics;
               ( 蟇伎螳 襷れ 襷  compute  estimate )

               select avg_row_len 
               from user_tables 
               where table_name='EMP';

2 INDEX SIZE 螻 螻旧 #

SQL> SELECT   GREATEST(4, (1.01) * ((ROW_COUNT /
              ((floor(((2048 - 113 - (initrans * 23)) * 
              (1 - (PCTFREE/100))) /
              ((10 + uniqueness) + number_col_index + 
              (total_col_length)))))) * DB_BLOCK_SIZE))
              IndexSize_Kbytes
     FROM dual;

*.  螳 block available  bytes ( 1935 or 2048 - 113 )
*. 螳 initrans  23 Bytes
*. ROW_COUNT : table  row  螳
*. PCTFREE : Index  pctfree 螳(default 10)
*. number_col_index : Index  column  
*. total_col_length : Index  蠍語 豢豺
*. uniqueness : 襷 unique index 企 1, non-unique index 企 0. 
*. DB_BLOCK_SIZE : 1 block 蠍 (: K)
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

覓殊 襷讌 襷. (覯 蟲 蟆)