Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: table size
In article <714dvs$g93$1_at_venus.uvsq.fr>,
"Fei Sha" <shaf_at_prism.uvsq.fr> wrote:
> Hi everyone,
> How to know the size of a table in Mb or number of blocks?
> Thank!
>
> Fei
>
> Hi,
this is a little script to get essential informations with sqlplus. It's also
useful to see when extents reachs the max number of extents :
set verify off
set termout off
set feedback off
set echo off
set head on
set pages 64
set lines 80
clear computes
column segment_name format a20 heading 'Table Name' column pct_increase format 999 heading 'Pctin.' column sum(bytes) format 9999999999 heading 'Nb Bytes' column initial_extent format 9999999999 heading 'Init. Ext.' column next_extent format 9999999999 heading 'Next Ext.' column max_extents format 9999 heading 'Max Ext.' column count(*) format 9999 heading 'Nb Ext.'spool outfile
b.table_name and segment_type = 'TABLE' and a.owner='YOU' group by segment_name, pct_increase, max_extents, initial_extent, next_extent order by segment_name, max_extents;
I hope that helps you.
Regards,
Thierry
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Oct 28 1998 - 11:26:46 CST
![]() |
![]() |