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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: count of obj

RE: count of obj

From: Kommareddy, Srinivas (MED, Wissen Infotech) <Srinivas.Kommareddy_at_med.ge.com>
Date: Fri, 5 Mar 2004 23:47:59 -0600
Message-ID: <1C9727B12F498543A43CBB988F30515C0287E732@uswaumsx14medge.med.ge.com>


Thi also took more than 10 mins to execute and got only 1s (not the total count)  

        1  

  COUNT(*)


         1
         1
         1
         1
         1
         1
         1
 
110 rows selected.
                   

but  

1 select segment_name, sum(bytes) from dba_segments   2 group by segment_name
  3* having sum(bytes)>1048576*1024  

this gave me 156 records    

checking the other one:  

select count(*)
 from (select owner,segment_name,segment_type,sum(bytes)    from dba_extents
   group by owner,segment_name,segment_type    having sum(bytes)>1048576*1024) ;  

..........  

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jay
Sent: Saturday, March 06, 2004 11:47 AM
To: oracle-l_at_freelists.org
Subject: RE: count of obj  

SQL> l
  1 select count(*) from dba_segments
  2 group by segment_name
  3* having round(sum(bytes)/1024/1024/1024) >1  

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Kommareddy, Srinivas
(MED, Wissen Infotech)
Sent: Friday, March 05, 2004 11:55 PM
To: oracle-l_at_freelists.org
Subject: count of obj
Hi All,  

Can somebody give a simple query to find  

the count(*) of objects which have size >1 Gig  

its not this.  

select segment_name, round(sum(bytes)/1024/1024/1024) from dba_segmnets group by segment_name
having round(sum(bytes)/1024/1024/1024) >1;    

Need just count(*) of objects in the db > 1Gig size  

Tx and Regards,
Srinivas



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Sat Mar 06 2004 - 00:43:45 CST

Original text of this message

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