Seems to be different queries to me:
select count(case ... ) into count1,
count(case ... ) into count2
from isi.nametag
suggests a full scan on isi.nametag whereas the two
separate queries:
select count(*) from isi.nametag where geneid=geneid1
select count(*) from isi.nametag where
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
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
Hi,
How about a statement like
select count(decode(geneid, geneid1, 1, 0)),
count(decode(geneid, geneid2, 1, 0))
into count1, count2
from isi.nametag
This should produce the same result I believe, and is one single simple SQL
statement so PL/SQL should eat it up just fine.
I too faced the problem of case not working in pl/sql procedures. So I
created a view.
Would creating a view work for you ?
-Original Message-
Sent: Monday, February 24, 2003 3:07 PM
To: Multiple recipients of list ORACLE-L
Hi:
Oracle 8173 on Sun Solaris 2.8. I am trying to optimize
responses to 2 posts: comments below each post.
-Original Message-
From: gmei [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 4:53 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: select count(case ...) slow in PL/SQL, any better way?
Hi:
Just after I sent
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
I thought case in PL/SQL was not available until 9i. I'll have to look that up.
[EMAIL PROTECTED] 02/24/03 04:38PM
I too faced the problem of case not working in pl/sql procedures. So I
created a view.
Would creating a view work for you ?
-Original Message-
Sent: Monday, February
CASE appeared (with little fanfare) in 8.1.6. However, until Oracle9, it
was not available in PL/SQL, when they integrated the PL/SQL engine into
the kernel.
Darrell Landrum wrote:
I thought case in PL/SQL was not available until 9i. I'll have to look that up.
Thanks!
[EMAIL PROTECTED] 02/24/03 06:28PM
CASE appeared (with little fanfare) in 8.1.6. However, until Oracle9, it
was not available in PL/SQL, when they integrated the PL/SQL engine into
the kernel.
Darrell Landrum wrote:
I thought case in PL/SQL was not available until 9i. I'll have to
10 matches
Mail list logo