Re: How to check the size of table structure and its data?
Date: Thu, 04 Jan 2001 00:18:19 GMT
Message-ID: <3a53bf7c.3184695_at_news.erols.com>
On Sat, 30 Dec 2000 12:28:40 +0800, "ivy" <ivy_at_email.tech-trans.com> wrote:
>Hi,
> Would you tell me how to check the physical size of table (in term of
>byte)?
>
>--
>Best Regards,
>Ivy
>
>
Try this: (from "Oracle DBA 101")
set pagesize 70
set feedback off
set numwidth 12
compute sum of Bytes on report
compute sum of Bytes on Tablespace_Name
break on Tablespace_Name skip 2
column One noprint
column Two heading 'Space Type' format a20
column Bytes format 9,999,999,990
column Tablespace_Name format a18
select 1 One, Tablespace_Name, 'Max available: ' Two, sum(Bytes) Bytes
from DBA_DATA_FILES
group by Tablespace_Name union select 2 Two, Tablespace_Name,
'Allocated: ',
nvl(((sum(Bytes) + decode(Tablespace_Name, 'SYSTEM',2048,1024)) *
-1),0)
from DBA_EXTENTS
group by Tablespace_Name
order by 2, 1;
clear computes
clear breaks
column Tb heading 'Frag' format 9,990 column Sm heading 'Small' format 9,999,999,990 column Lg heading 'Large' format 9,999,999,990rem
select
Tablespace_Name, sum(Bytes) Bytes, count(Blocks) Tb, min(Bytes) Sm,
max(Bytes) Lg
from
DBA_FREE_SPACE
group by
Tablespace_Name; Received on Thu Jan 04 2001 - 01:18:19 CET