First you need to figure out what is the typical value for varchar2
column. The total size will depend on that. I created 2 tables from your BILL
table. BILLMAX
where ccode
takes always 20 Char ('12345678901234567890')
and BILLMIN
that has always NULL
in ccode
.
The results are:
TABLE_NAME NUM_ROWS AVG_ROW_LEN BLOCKS
BILLMAX 3938 37 28
BILLMIN 3938 16 13
select table_name, num_rows, avg_row_len, blocks from user_tables
where table_name in ( 'BILLMIN', 'BILLMAX')
As you can see, the number of blocks depends on that. Use exec dbms_stats.GATHER_TABLE_STATS('YourSchema','BILL')
to refresh values inside user_tables.
The other thing that you need to take into consideration is how big will be your extents. For example :
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
)
will generate first 16 extents with 8 blocks size. After that it will start to create extents with size of 1 MB (128 blocks).
So for BILLMAX
it will generate 768 blocks and BILLMIN
will take 384 blocks.
As you can see the difference is quite big.
For BILLMAX
: 16 * 8 + 128 * 5 = 768
For BILLMIN
: 16 * 8 + 128 * 2 = 384