Академический Документы
Профессиональный Документы
Культура Документы
A B
---------- --------------------
1 Q48VY
2 KJ5HD6LKFV244NH
1 RIXX8YFSHKVJ19Z2A8
2 FVBZEHJOL5YY3JN
1 GTEG14
2 0EFKM
1 3PKZYH992LJDXEW1
2 XZUNF3E9
1 TAVL4K98L3G8CM8
Now, using vsize, I want to calculate the amount of data in bytes stored in the table:
RENE> select sum(vsize(a) + vsize(b)) data_size from size_test;
DATA_SIZE
----------
1451138
BYTES
----------
2490368
Deleting data
I delete half of the data:
RENE> delete from size_test where a = 2;
DATA_SIZE
----------
725662
It has reduced by 50% as well. But what about the size of the needed storage?
RENE> select bytes from user_segments where segment_name =
'SIZE_TEST';
BYTES
----------
2490368
It remaind exactly the same. When data is deleted, Oracle does not free storage space.