Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Find out the top 20 biggest tables

Re: Find out the top 20 biggest tables

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 18 Mar 2005 02:04:49 -0800
Message-ID: <1111140289.942800.233760@z14g2000cwz.googlegroups.com>

Ralf Bender wrote:
> Hi
>
> has anyone a script to find out the top 20 biggest tables in a
tablespace?
>
> regards
> ralf

select *
from (select segment_name "Table Name",

             round(sum(bytes)/1024/1024, 2) "Size MB"
      from dba_extents
      where tablespace_name = '&tablespace_name'
      and segment_type = 'TABLE'
      group by segment_name
      order by 2 desc)

where rownum < 21

Regards
/Rauf Received on Fri Mar 18 2005 - 04:04:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US