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: Sarnowski, Chris <csarnows_at_CuraGen.com>
Date: Mon, 24 Feb 2003 15:09:06 -0800
Message-ID: <F001.00557BD9.20030224150906@fatcity.com>

Upon further thought, what are you trying to gain by this "optimization"? If these are primary key values, you will do a unique index lookup and they should both be very fast. If you are doing millions of these, you may want to rethink the whole algorithm (this said without knowing how you are using the counts - and don't tell me because we are competitors).

-Chris

> -----Original Message-----
> From: gmei [mailto:gmei_at_incyte.com]
> Sent: Monday, February 24, 2003 4:07 PM
> To: Multiple recipients of list ORACLE-L
> Subject: select count(case ...) slow in PL/SQL, any better way?
>
>
> Hi:
>
> Oracle 8173 on Sun Solaris 2.8. I am trying to "optimize" the
> follwoing code
> (in an PL/SQL package) into one table call (instead of two)
>
> select count(1) into count1 from isi.nametag where geneid=geneid1;
> select count(1) into count2 from isi.nametag where geneid=geneid2;
>

LEGAL NOTICE:
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Sarnowski, Chris
  INET: csarnows_at_CuraGen.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 - 17:09:06 CST

Original text of this message

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