Home » RDBMS Server » Server Administration » Measuring the size of a table
Measuring the size of a table [message #129100] Fri, 22 July 2005 00:27 Go to next message
ksst
Messages: 10
Registered: February 2005
Junior Member
Hi,

In a tablespace having several tables, how do we find out the amount of space occupied by individual tables.

Within a table is it possible to find hou much space is occupied by a set of rows?

Could you help me out in this please.

Thanks in advance,
Sai
Re: Measuring the size of a table [message #129189 is a reply to message #129100] Fri, 22 July 2005 07:12 Go to previous message
Frank Naude
Messages: 4580
Registered: April 1998
Senior Member
Size of an individual table:
SQL> SELECT bytes
  2    FROM dba_segments
  3   WHERE owner        = 'SCOTT'
  4     AND segment_name = 'EMP'
  5  /

     BYTES
----------
     65536


Size of rows (you can add a where clause to exclude rows):
SQL> SELECT SUM( VSIZE(empno) + VSIZE(ename) + VSIZE(job) + VSIZE(mgr) +
  2              VSIZE(hiredate) + VSIZE(sal) + VSIZE(comm) + VSIZE(deptno) ) bytes
  3  FROM   scott.emp
  4  /

     BYTES
----------
       130


The difference is overhead.

Best regards.

Frank

Previous Topic: unable to start oracle using w2k and 8i (OS Err 997)
Next Topic: find the path for logfiles
Goto Forum:
  


Current Time: Thu Sep 26 22:45:40 CDT 2024