Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: monitor space
If rough estimation is ok for you try this
select (100 * num_rows * avg_row_len) / ((blocks + empty_blocks) * DB_BLOCK_SIZE) prec_used
from user_tables where table_name='TB1'
Replace DB_BLOCK_SIZE with the value for your database and don't forget to analyze TB1 before running this query.
Adam
Brian Yan wrote:
> Hi there,
>
> I am confused now. My space monitoring report shows that the percent
> free of tablespace is close to 0%, but my supervisor still said it had
> plenty of space. The reason is as follows,
>
> Tablespace TS1 has size 500M, it only has one table TB1 on it. TB1 has a
> big initial extent 499M, although right now the row number of TB1 is
> zero. In this case, percent free of a tablespace does make sense at all.
>
> My question is, is there a way to calculate the percent of used space
> rather than the allocated space? I tried out several methods, but it
> looks like DATA Dictionary does not contain "space used" information.
> Please let me know if you have a way to calculate the used space.
>
> Thank you.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Tue Aug 17 1999 - 04:50:36 CDT
![]() |
![]() |