Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to determine used blocks in an extent.
Roy Varghese wrote:
> I have a table that has been allocated a very large initial
> extent. Something like 1.7GB. It is contained in a tablespace
> of 2 GB. Only an ANALYZE TABLE would show the actual number of
> blocks which are free or used-up in the extent. However the
> ANALYZE TABLE command takes quite a long time to complete
> since there are too many rows in the table.
>
> Can someone suggest a faster way of determining the blocks'
> usage within the extent?
>
> All answers appreciated.
Hello Roy
In a similar case I've used something like the statement below:
dbms_space.unused_space( rtrim(zorg.owner) , rtrim(zorg.segment_name) , rtrim(zorg.segment_type) , TOTAL_BLOCKS , TOTAL_BYTES , UNUSED_BLOCKS , UNUSED_BYTES , LAST_USED_EXTENT_FILE_ID , LAST_USED_EXTENT_BLOCK_ID , LAST_USED_BLOCK);
If I my memory is correct it reads the High Water Mark in the segment_header so it performs quite a lot better then an "analyze table".
I hope this is what you were looking for, greetings
Maarten van Nijnanten
(If you want to reply replace ij with y.) Received on Mon Dec 01 1997 - 00:00:00 CST