size of user

size of user

Post by Uwe Wagne » Thu, 06 Jun 2002 20:33:02



Hi,

I want to know the bytes used by all tables from one user.
Is this information available from a table or view ?

uwe

 
 
 

size of user

Post by Daniel Morga » Sat, 08 Jun 2002 05:27:56



> Hi,

> I want to know the bytes used by all tables from one user.
> Is this information available from a table or view ?

> uwe

SELECT SUM(bytes)/1024/1024 MB_USED
FROM user_segments;

or

SELECT SUM(bytes)/1024/1024 MB_USED
FROM all_segments
WHERE owner = <owner_name>;

Daniel Morgan

 
 
 

size of user

Post by Sybrand Bakke » Sat, 08 Jun 2002 05:31:50



Quote:> Hi,

> I want to know the bytes used by all tables from one user.
> Is this information available from a table or view ?

> uwe

select sum(bytes) from user_segments where segment_type = 'TABLE'
or
select sum(bytes) from dba_tables where owner = '<yourowner>' and
segment_type = 'TABLE'
etc.

Hth

 
 
 

size of user

Post by Daniel Morga » Sat, 08 Jun 2002 06:17:48





> > Hi,

> > I want to know the bytes used by all tables from one user.
> > Is this information available from a table or view ?

> > uwe

> select sum(bytes) from user_segments where segment_type = 'TABLE'
> or
> select sum(bytes) from dba_tables where owner = '<yourowner>' and
> segment_type = 'TABLE'
> etc.

> Hth

I assumed he also wanted associated indexes, etc. but you are
technically more correct given what he asked.

Daniel Morgan

 
 
 

size of user

Post by Andy Finkenstad » Sat, 08 Jun 2002 06:15:52


I recommend using a scale built-in to their ergonomic seat. :)

Andy

PS ..

SELECT sum(bytes)/1024/1024 AS MEGABYTES
FROM user_segments

SELECT segment_type, sum(bytes)/1024/1024 AS MEGABYTES
FROM user_segments
GROUP BY segment_type
ORDER BY segment_type

SELECT owner, segment_type, sum(bytes)/1024/1024 AS MEGABYTES
FROM dba_segments
GROUP BY owner, segment_type
ORDER BY owner, segment_type

SELECT owner, sum(bytes)/1024/1024 AS MEGABYTES
FROM dba_segments
GROUP BY owner
ORDER BY owner

--
Andrew Finkenstadt (http://www.finkenstadt.com/andy/)

 
 
 

size of user

Post by Uwe Wagne » Tue, 11 Jun 2002 15:48:21


Thanks a lot for your help.
This is exactly, what I need.

uwe




> > Hi,

> > I want to know the bytes used by all tables from one user.
> > Is this information available from a table or view ?

> > uwe

> SELECT SUM(bytes)/1024/1024 MB_USED
> FROM user_segments;

> or

> SELECT SUM(bytes)/1024/1024 MB_USED
> FROM all_segments
> WHERE owner = <owner_name>;

> Daniel Morgan