I wanted to find out for a while how the internal work for the DECODE and NVL functions is done. Does the DECODE function have more overhead if the number of arguments in it is greater?
In addition, the NVL function evaluates the value specified instead of NULL, even if the original value is not NULL, for example, for NVL (COL1, func_call ()), func_call () will be calculated, even if COL1 is not NULL. In this case, a performance problem may occur if COL1 is rarely null and func_call () is time consuming.
Thanks in advance
NVL always evaluates both arguments, so even if COL1 is not zero, it will evaluate func_call ()
, .
. - NVL, if-then-else.
---- EDIT ----
, NVL, , NVL, nvl (col1, nvl (col2, '0')), coalesce, coalesce (col1, col2, '0') -