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: select count(case ...) slow in PL/SQL, any better way?

Re: select count(case ...) slow in PL/SQL, any better way?

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Mon, 24 Feb 2003 14:16:16 -0800
Message-ID: <F001.00557A0D.20030224141616@fatcity.com>


gmei wrote:
>
> Hi:
>
> Just after I sent my original message, it occured to me that I could use
> this to "optimize" the sql (gneid is the PK column of the table):
>
> select count(A.geneid), count(B.geneid) into count1, count2
> from isi.nametag A , isi.nametag B where A.geneid=geneid1 and
> B.geneid=geneid2;
>
> Guang
>

Think harder. What happens when say geneid1 is not found ?

BTW this kind of existence test is quite often dispensable ...

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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).
Received on Mon Feb 24 2003 - 16:16:16 CST

Original text of this message

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