Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Cost of decode in the WHERE part
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