Thanks for the SQL all.  Here is the result.  You can change and use this
with DBA_FREE_SPACE also if your not using uniform extent sizes to help
determine level of fragmentation.

select tablespace_name,
       count(*) f_count,
       sum(decode(sign(round(bytes/1024) - 64), 1, 0, 1)) f_below_64kb,
       sum(decode(sign(round(bytes/1024) - 129) * sign(round(bytes/1024) -
64), -1, 1, 0)) f_65k_128kb,
                 sum(decode(sign(round(bytes/1024) - 501) *
sign(round(bytes/1024) - 128), -1, 1, 0)) f_129k_500kb,
                 sum(decode(sign(round(bytes/1024) - 1025) *
sign(round(bytes/1024) - 500), -1, 1, 0)) f_501kb_1mb,
                 sum(decode(sign(round(bytes/1024) - 10241) *
sign(round(bytes/1024) - 1024), -1, 1, 0)) f_1025kb_10mb,
                 sum(decode(sign(round(bytes/1024) - 999999999999) *
sign(round(bytes/1024) - 10240), -1, 1, 0)) f_above_10mb,
                 round(max(bytes/1024)) f_max_kb,
                 round(avg(bytes/1024)) f_avg_kb
from
       dba_segments
where
       segment_type = 'TABLE'
group by
       tablespace_name;


------------------------------------------------------------------------------
This e-mail is intended for the use of the addressee(s) only and may contain 
privileged, confidential, or proprietary information that is exempt from disclosure 
under law.  If you have received this message in error, please inform us promptly by 
reply e-mail, then delete the e-mail and destroy any printed copy.   Thank you.

==============================================================================
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Post, Ethan
  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