Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to calculate free space left in tablespace
On Wed, 18 Aug 1999 23:15:13 GMT, Jeremy.Russell_at_usa.net (Jeremy
Russell) wrote:
>The dba_free_space view lists totally unused extents; this does NOT
>therefore include allocated blocks that are empty. You ought to be
>able to 'analyze table T compute statistics;', then use the result
>fields (dba_tables.num_rows, .blocks, .empty_blocks, .avg_space) to
>figure out the unused space WITHIN each table.
>
>Bear in mind that this will not show unused allocated space in indexes
>or other object types, nor will this space be easily retrieved for use
>by other objects.
Bear also in mind that the DBA_TABLES.blocks and .empty_blocks don't really show used and empty blocks respectively, i.e. blocks with and without any data. They show the blocks below and above highwater mark, which might not be the same as used and unused blocks. So you can delete all rows from a table, re-analyze it and the .blocks and .empty_blocks will still show the same numbers as before the deletion!
>Hope that helps
>
>Jeremy Russell
Regards,
Jurij Modic <jmodic_at_src.si>
Certified Oracle DBA (7.3 & 8.0 OCP)