Query cost and CASE statement
107498Sep 16 2004 — edited Sep 17 2004Hi, 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.