calculate sizing of a table

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

calculate sizing of a table

Roshan
Oracle Database 12.2.0
RHEL 7.4

Hi Erman,

I am loading data from flat files once per day. I am querying dba_segments to get the segment bytes. Is this value sufficient to calculate the table size? or should I take into account
colkumn overhead, row overhead, block overhead and PCTFREE , plus a couple of oddities with longs, lobs and strings longer than 254 bytes

Regards,

Roshan
Reply | Threaded
Open this post in threaded view
|

Re: calculate sizing of a table

Roshan
Should I sum these below

We need to know which Oracle table size we wish to query:-

-Do we want only the row space consumed?
( select avg_row_len*num_rows from dba_tables)
-Do we want to include allocated file space for the table?
(select . . . from dba_segments)
-Do we want to include un-used extent space?
(select . . . from dba_data_files, dba_extents . . )

Ref: https://community.oracle.com/thread/2620577
Reply | Threaded
Open this post in threaded view
|

Re: calculate sizing of a table

ErmanArslansOracleBlog
Administrator
using dba_segments is good for hat.
It shows you how much space needed to hold your data in the Oracle Database, and it seems this is what you are asking for. You don't care about free space and etc, so dba_segments is good for you.