CASE vs. DECODE

前端 未结 7 1192
小蘑菇
小蘑菇 2020-11-28 09:04

Referring to a previous question, i was wondering if its always possible to replace DECODE by CASE and which one is better for performance?

7条回答
  •  执笔经年
    2020-11-28 09:56

    From performance perspective, In Oracle decode and CASE does not make any difference.

    But in Exadata , Decode is faster than CASE.

    The Decode operation is done at storage Server level where the data is present BUT CASE is done at DB Instance level which receives data from DB storage Level.

    Though that network transfer of data between Storage and DB server is less (Infiniband connection), that transfer is avoided when you use decode statment

提交回复
热议问题