Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: table/index space usage
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:gregory.t.norris_at_mail.sprint.com]
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: gregory.t.norris_at_mail.sprint.com
OpenMail: Norris, Gregory T.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Bala, Prakash
INET: prakash.bala_at_cingular.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (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). Received on Wed Apr 04 2001 - 13:52:59 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message