Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query cost and CASE statement

107498Sep 16 2004 — edited Sep 17 2004
Hi, I'm working on a performance issue for a customer.

I'm tuning some suspect SQL that uses complex DECODE statements to perform IF/THEN/ELSE logic.

I've taken a statement and rewritten it using CASE however what I've noticed is the cost of the query execution plan has increased dramatically as a result. N.B. I haven't changed the WHERE clause of the query as yet, just replaced one DECODE with the equivalent CASE.

The db version is 9.2.0.4. Does anyone know of issues with the performance of CASE as opposed to DECODE. I'm wondering should I leave the DECODEs as is even though they're way too complicated.

Tks,

Paul.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2004
Added on Sep 16 2004
7 comments
1,297 views