How to know the space a table takes?


I get one database, we want to know how individual table take how much space. I try to use quary:

select table_name,sum(blocks) as block from dba_tables
group by table_name;

I think if I get block number for each table, then times block size, i will get answer, but I just get return table_name.

have someone have idea about that?
 



In order to get statistics like block size on a table, you must first analyze them. You can either do

ANALYZE TABLE owner.table_name COMPUTE STATISTICS;

or

execute DBMS_UTILITY.ANALYZE_SCHEMA('OWNER','COMPUTE');

these should be done on a daily basis. for up to date data.
 
 

Hosted by www.Geocities.ws

1