Decode/CASE performance issues?
Hello all,
This is my first question and it is pl/sql related in general. I've got very large tables being scanned in a report and the ETA of the report reaches about 4-5 hours sometimes.
I want to ask if it is connected with the often use of DECODE/CASE? If I replace such statements with some equivalent, will the report perform better.
Example:
Select case when a<>5 then sysdate end as x from table1
VERSUS
Select sysdate*(a-5)/nvl((a-5),1) as x from table1
I was told DECODE/CASE statements do full table scans and greatly slow down the entire report.
This is my first question and it is pl/sql related in general. I've got very large tables being scanned in a report and the ETA of the report reaches about 4-5 hours sometimes.
I want to ask if it is connected with the often use of DECODE/CASE? If I replace such statements with some equivalent, will the report perform better.
Example:
Select case when a<>5 then sysdate end as x from table1
VERSUS
Select sysdate*(a-5)/nvl((a-5),1) as x from table1
I was told DECODE/CASE statements do full table scans and greatly slow down the entire report.
0