Gregory,

This will give you the number of extents allocated and the the last used
block# for a given segment.

    select extent_id+1, block_id
    from dba_extents
    where extent_id = (select max(extent_id)
                       from dba_extents
                       where segment_name = 'YYY'
                         and owner = 'XXX'
                         and tablespace_name = 'ZZZ')
      and segment_name = 'YYY'
      and owner = 'XXX'
      and tablespace_name = 'ZZZ';

So the total space used (in bytes) = # of extents * extent size * block size

HTH

Prakash

-----Original Message-----
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 3:21 PM
To: Multiple recipients of list ORACLE-L


I need to determine how much space some tables/indexes are really 
using, as opposed to how much is allocated to them.  Anyone have a 
script you'd be willing to share?

Cheers!

--
My employers like me, but not enough to let me speak for them.

Greg Norris
Sprint LTD Database Administration
Phone: 913.345.6628
Internet: [EMAIL PROTECTED]
OpenMail: Norris, Gregory T.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Bala, Prakash
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to