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: Slow running Query.

RE: Slow running Query.

From: Juan Carlos Reyes Pacheco <jreyes_at_dazasoftware.com>
Date: Tue, 22 Jun 2004 13:57:11 -0400
Message-Id: <40D872F7.00000B.02400@CACHITOSS>


Thank Thomas I knew that, but you example is very nice, I'm adding to my paper if you don't have nothing against it.  

-------Original Message-------
 

From: oracle-l_at_freelists.org
Date: 06/22/04 13:40:25
To: oracle-l_at_freelists.org
Subject: RE: Slow running Query.  

FYI... SUM function (for that matter any aggregate function except COUNT, G= ROUPING) ignore NULLs. Try this:  

select sum(nvl(test,5)) from test
8  

select nvl(sum(test),5) from test;
3  

select nvl(sum(test),5) from test
where test is null;
5  

select sum(n) from test;
3        

-----Original Message-----

From: Juan Carlos Reyes Pacheco [mailto:jreyes_at_dazasoftware.com] Sent: Tuesday, June 22, 2004 12:21 PM
To: oracle-l_at_freelists.org
Subject: RE: Slow running Query.    

Hi Lex, why you say that, could you showme why please  

I show you why I say is the same:
SQL> select * from test;  

TEST



1  

2  

Transcurrido: 00:00:00.00
SQL> select count(*) from test where test is null;  

COUNT(*)



1  

Transcurrido: 00:00:00.00
SQL> select sum(nvl(test,0)) from test;  

SUM(NVL(TEST,0))



3  

Transcurrido: 00:00:00.00
SQL> select nvl(sum(test),0) from test;  

NVL(SUM(TEST),0)



3  

Transcurrido: 00:00:00.00    

___________________________________________________________________________=
__________________________________
 

This electronic transmission and any attached files are intended solely for= the person or entity to which they are addressed and may contain informati= on that is privileged, confidential or otherwise protected from disclosure.= Any review, retransmission, dissemination or other use, including taking a=

ny action concerning this information by anyone other than the named recipi=
ent, is strictly prohibited. If you are not the intended recipient or have =
received this communication in error, please immediately notify the sender =
and destroy this communication.

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

-----------------------------------------------------------------
----------------------------------------------------------------
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 Tue Jun 22 2004 - 13:02:19 CDT

Original text of this message

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