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

Home -> Community -> Usenet -> c.d.o.misc -> Cost of decode in the WHERE part

Cost of decode in the WHERE part

From: ian <ipellew_at_yahoo.com>
Date: 1 Feb 2007 06:08:04 -0800
Message-ID: <1170338884.062453.226290@v45g2000cwv.googlegroups.com>


Hi All;

Is there any experience on the cost of having DECODE in the where part of a select statement on this list Please?

EG
and DECODE(upper(chg_party),'A',a_sub_num,b_sub_num) = t.telephony_id

I would have done somethong like :-
 and ( ( a_sub_num = t.telephony_id and ( chg_party = 'A' or chg_party = 'a' ) )

   or ( b_sub_num = t.telephony_id and ( chg_party != 'A' and chg_party != 'a' ) )

        )

The select is on a wide long table that will have to be scanned from other parts of the SQL.

Regards
Ian Received on Thu Feb 01 2007 - 08:08:04 CST

Original text of this message

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