user2584537
user2584537

Reputation: 49

Oracle: How to convert row count into data size

I would like to know how do i convert number of row into size like in MB or KB? Is there a way to do that or formula?

The reason I doing this is because I would like to know given this set of data but not all in tablespace, how much size is used by this set of data.

Thanks, keith

Upvotes: 1

Views: 2912

Answers (1)

user330315
user330315

Reputation:

If you want an estimate, you could multiple the row count with the information from user_table.avg_row_len for that table.

If you want the real size of the table on disk, this is available user_segments.bytes. Note that the smallest unit Oracle will use is a block. So even for an empty table, you will see a value that is bigger tzen zero in that column. That is actual size of the space reserved in the tablespace for that table.

Upvotes: 1

Related Questions