Re: How TO KNOW TABLE SIZE

2002-03-04 Thread Bill Gentry

This is what I use.  Hope it helps.

spool table_space_usage.log 
set pagesize 0  
set linesize 80   
select   substr (segment_name,1,20)   
  ,bytes / 1024 kbytes 
  ,extents 
  ,blocks  
  from sys.dba_segments  
  where  owner = 'LAWSON'
   and segment_name like 'AR%'  
   and segment_type = 'TABLE'
  order by  segment_name 
/
spool off;   

Bill Gentry
DBA
Allina Health System
Minneapolis, MN 55403
612-775-1190
[EMAIL PROTECTED]
- Original Message - 
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Monday, March 04, 2002 1:08 PM


 Hi
 How can I know how much space a table occupied?
 Can BLOCKS columns in dba_tables helps?
 Or I have to use dba_extents and dba_segments tables?
 Thx
 -Seema
 
 
 
 _
 MSN Photos is the easiest way to share and print your photos: 
 http://photos.msn.com/support/worldwide.aspx
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Seema Singh
   INET: [EMAIL PROTECTED]
 
 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: [EMAIL PROTECTED] (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).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Bill Gentry
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).



Re: How TO KNOW TABLE SIZE

2002-03-04 Thread Gene Gurevich

I usually do

select sum(bytes) from dba_Segments
where segment_name = 'TABLENAME';

HTH
--- Seema Singh [EMAIL PROTECTED] wrote:
 Hi
 How can I know how much space a table occupied?
 Can BLOCKS columns in dba_tables helps?
 Or I have to use dba_extents and dba_segments
 tables?
 Thx
 -Seema
 
 
 

_
 MSN Photos is the easiest way to share and print
 your photos: 
 http://photos.msn.com/support/worldwide.aspx
 
 -- 
 Please see the official ORACLE-L FAQ:
 http://www.orafaq.com
 -- 
 Author: Seema Singh
   INET: [EMAIL PROTECTED]
 
 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: [EMAIL PROTECTED] (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).


=


__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gene Gurevich
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).



RE: How TO KNOW TABLE SIZE

2002-03-04 Thread Tomita Koga, Alex - (Per)

Check this note from metalink.


***

Title: Script to compute table size

Disclaimer:
This script is provided for educational purposes only. It is NOT
supported by Oracle Support Services.  The script has been
tested and appears to work as intended.  However, you should always
test any script before relying on it.

PROOFREAD THIS SCRIPT PRIOR TO USING IT!  Due to differences in the
way text editors, email packages and operating systems handle text
formatting (spaces, tabs and carriage returns), this script may not
be in an executable state when you first receive it.  Check over the 
script to ensure that errors of this type are corrected.

Abstract:
It is sometimes necessary to calculate the exact size (exact 
number of bytes) of a table. 

The function 'VSIZE' gives the exact number of bytes allocated
by Oracle for data.
 
For example, if you have a table called 'table1' with n columns  
say, 'col1', 'col2',  , 'coln', execute the following SQL
statement to find the exact size of the table:
  
SELECT SUM(VSIZE(col1)) + SUM(VSIZE(col2)) + ... + 
   SUM(VSIZE(coln)) FROM table1;

In the scott/tiger schema, the following SQL statement can be
executed to find the exact table size of the 'DEPT' table:

SQL SELECT SUM(VSIZE(deptno)) + SUM(VSIZE(dname)) +
 SUM(VSIZE(loc)) FROM dept;

SUM(VSIZE(DEPTNO))+SUM(VSIZE(DNAME))+SUM(VSIZE(LOC))

 88
Requirements:
None

Version Testing:
This script was tested on Oracle 7.3.3 to 8.1.6 and SQL*Plus 


***


ATT Latin America
Alex Tomita Koga - ITS
e-mail: [EMAIL PROTECTED]
phone: (51) 1 610- extension 2619
Av. Larco 1301 Torre Parque Mar - Miraflores




-Mensaje original-
De: Seema Singh [mailto:[EMAIL PROTECTED]]
Enviado el: Lunes, 04 de Marzo de 2002 02:08 p.m.
Para: Multiple recipients of list ORACLE-L
Asunto: How TO KNOW TABLE SIZE


Hi
How can I know how much space a table occupied?
Can BLOCKS columns in dba_tables helps?
Or I have to use dba_extents and dba_segments tables?
Thx
-Seema



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Seema Singh
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Tomita Koga, Alex  - (Per)
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).