Re: SQL to list actual space used
From: Dagmar A. Bogan <dagmar_at_indian.mitre.org>
Date: 8 Nov 1993 13:10:51 GMT
Message-ID: <2blggs$mc1_at_linus.mitre.org>
rem * by a table
set term off
set echo off
set newpage 0
set pages 60
col sysdate new_value today
select sysdate from dual;
ttitle left today center 'ACTUAL SPACE USED BY TABLE' right format 99 sql.pno skip 2
The opinions expressed herein do not necessarily reflect those of The MITRE Corporation.
Date: 8 Nov 1993 13:10:51 GMT
Message-ID: <2blggs$mc1_at_linus.mitre.org>
I don't know if this is of any use or not...it displays actual space used by table. The &tablename will prompt you for a table name:
rem ****************************** rem * space.sql rem * created by d.a. bogan rem * displays actual space used
rem * by a table
rem ******************************
set term off
set echo off
set newpage 0
set pages 60
col sysdate new_value today
select sysdate from dual;
ttitle left today center 'ACTUAL SPACE USED BY TABLE' right format 99 sql.pno skip 2
spool space
select
substr(rowid,1,8)||substr(rowid,15,4) block, count(*)
from &tablename
group by substr (rowid,1,8)||substr(rowid,15,4);
spool off
set term on
set echo on
exit;
The opinions expressed herein do not necessarily reflect those of The MITRE Corporation.
Dagmar Anne Bogan * Software Engineering Center * The MITRE Corporation * phone: 703.883.6093 M/S Z676 * fax: 703.883.6991 7525 Colshire Drive * email: dagmar_at_indian.mitre.org McLean, Virginia 22102-3481 *Received on Mon Nov 08 1993 - 14:10:51 CET
******************************************************************************