Comparing Database Table Size, records and Export Files

The is a listing a an Example Database Table, the size it consumes within the Database and the Size an Export of the same will consume. The “Part” Table contains information of certain Parts which are supplied by different manufactures and looks like the following:

image 

The Table contains 1.4 Mio records:

image

Within the Database this Table consumes “only” 25 MB of storage:

image

When exporting the Table using the Export Wizard of SQL Developer and choosing the loader format,

image

the same Table consumes 147 MB of storage:

image

Thus, the is nearly a factor of 6 between the space a Table consumes within the Database and the exported information of the same.


Advertisements

retrieve Table Sizes in Oracle Database

To retrieve the Table Size of a Database Table in Oracle Database, the following SQL code can be used (also without DBA rights to DBA_Segments Data Dictionary Table):

image

select bytes/1024/1024 MB 
from user_segments 
where segment_name='<Table Name>';

E.g.

select bytes/1024/1024 MB 
from user_segments 
where segment_name='CUSTOMER';