Re: HELP:How do I determine how much space is consumed by each table row?
From: Gilles Bruno <Gilles.Bruno_at_ujf-grenoble.fr>
Date: 1995/09/08
Message-ID: <42pv5h$7vk_005_at_ujf-grenoble.fr>#1/1
Date: 1995/09/08
Message-ID: <42pv5h$7vk_005_at_ujf-grenoble.fr>#1/1
In article <42n5g1$8vr_at_gazette.medtronic.COM>, MasterG <martig4> wrote:
>I have a table with a field which is a long raw data type. Is there any way to
>determine how much space is being consumed by each row in this table? Also is
>there a utility script one can run to determine how many blocks are used out of
>those allocated for each table? Thanks in advance.
/*
table_usage.sql
%W% %E% %U% SCCS ID script to check how full a table really is
From "Oracle Performance Tuning"
11/22/93 SDB */
SET VERIFY OFF;
UNDEFINE TAB_NAME;
SELECT BLOCKS
ALLOCATED_BLKS, COUNT(DISTINCT SUBSTR(T.ROWID,1,8) || SUBSTR(T.ROWID,15,4)) USED, (COUNT(DISTINCT SUBSTR(T.ROWID,1,8) || SUBSTR(T.ROWID,15,4)) / BLOCKS) * 100 PCT_USED FROM SYS.DBA_SEGMENTS E, &&USER .&&TAB_NAME T WHERE E.SEGMENT_NAME = UPPER ('&&TAB_NAME') AND E.SEGMENT_TYPE = 'TABLE' GROUP BY E.BLOCKS ; ------------------------------------------------------------- ('< Gilles BRUNO. Universite Joseph Fourier. ,',) Tel: +33 76 63 56 68 Fax: +33 76 51 42 74 ''<< E-mail: Gilles.Bruno_at_ujf-grenoble.fr ----""-------------------------------------------------------Received on Fri Sep 08 1995 - 00:00:00 CEST