Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Table size in bytes

RE: Table size in bytes

From: Afanassiev, Alex <Alex.Afanassiev_at_team.telstra.com>
Date: Tue, 5 Sep 2000 09:43:07 +1100
Message-Id: <10609.116174@fatcity.com>


Hi Cemail

Below is example in blocks I ma leaving to you an opportunity to convert it to bytes

set pages 999 verify off
define t_name=&1
column tsname heading 'Tablespace' format A10 wrapped column towner heading 'Owner' format A12 wrapped column tname heading 'Table' format A15 wrapped column row_cnt heading 'Count' format 99999

column ext heading 'Ext' format 999
column Blk heading 'Alloc(K).' format 9999
column Ovr heading 'Ovrhd(K).' format 9999
column b_Blk heading 'Used(K)' format 9999 column a_Blk heading 'Free(K)' format 9999 column hwm_kbt heading 'HWB(K)' format 9999 analyze table &&1 compute statistics;
SELECT
 tb.owner towner
, tb.table_name tname
, tb.num_rows row_cnt
, sg.extents ext
, sg.blocks Blk
, tb.blocks b_Blk
, tb.empty_blocks a_Blk
, ( sg.blocks - tb.blocks -  tb.empty_blocks ) Ovr
, (sg.blocks - tb.empty_blocks - 1) hwm_Blk
FROM sys.dba_tables tb, sys.dba_segments sg WHERE tb.table_name = sg.segment_name
AND tb.owner = sg.owner
AND tb.table_name LIKE '&&t_name%'
/  

With regards
Alex Afanassiev
Oracle DBA, TOC OPS/Internet.Operations

Tel:	(03) 8 661 20 61
Fax:	(03) 9 650 36 74



> -----Original Message-----
> From: cemail_at_sprintmail.com [SMTP:cemail_at_sprintmail.com]
> Sent: Tuesday, September 05, 2000 9:59 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Table size in bytes
>
>
> How can you tell what the current size of a table is in bytes?
>
> -----
> Sent using MailStart.com ( http://MailStart.Com/welcome.html )
> The FREE way to access your mailbox via any web browser, anywhere!
>
> --
> Author:
> INET: cemail_at_sprintmail.com
>
> 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: 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 Mon Sep 04 2000 - 17:43:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US