Re: Segment summery views - do they exist?

From: David Crowson <zdxc0d_at_amoco.com>
Date: Fri, 1 Oct 1993 05:30:40 CDT
Message-ID: <1993Oct1.053040.20684_at_amoco.com>


In article gk0_at_gopher.cs.uofs.edu, littlec1_at_jaguar.uofs.edu (Chris Little) writes:
-->
-->I wonder if anyone out there has written scripts to create views
-->that contain information about all segments, such as
-->
-->segment_name
-->maximum size of a row (in bytes)
-->average size of a row (in bytes, using VSIZE)
-->number of rows in the segment/table
-->total number of bytes allocated
-->total number of bytes used
-->

This will have most of what you want
(but not no. of rows)

------------------  cut  here -----------------
break on tablespace_name page 1
set lines 132
set pages 60
set newpage 0
column tablespace_name heading 'TableSpace Name' format a20
column segment_name    heading 'Segment Name'    format a30 
column segment_type    heading 'Segment Type'    format a10
column mbytes          heading 'Mbytes'          format 9999.999
column extent          heading 'Ext|ents'            format 999
spool segs.lis
select tablespace_name,
       segment_name,
       segment_type,
       bytes/1024000 mbytes,
       extents

from dba_segments
order by tablespace_name,bytes desc
/

spool off
exit

---------------- end ---------------------------


---
-----------------------------------------------------------------------------
David Crowson          | "Rude alert! Rude alert! An electrical fire
DBA (ORACLE V.4,5,6,7) | has knocked out my voice-recognition unicycle! Many 
Amoco Exploration      | Wurlitzers are missing from my database! Abandon shop!  
Ealing, London         | This is not a daffodil! Repeat: This is not a daffodil!"
dcrowson_at_amoco.com     | - Holly (Ship's computer on Red Dwarf)
"My views not Amoex's" |               =%^)
 
Received on Fri Oct 01 1993 - 11:30:40 CET

Original text of this message