Is there is any Performance issue while using ISNULL() in SQL Server?

后端 未结 8 1779
陌清茗
陌清茗 2020-12-15 06:51

I am using ISNULL in MS SQl server 2008, since my table is too huge, whether using of ISNULL may cause any thing to the performance ?.

Than

8条回答
  •  -上瘾入骨i
    2020-12-15 07:25

    If you need to use it, then any differences between ISNULL and alternatives like COALESCE or CASE are minuscule. Don't worry about it

    Any differences come from how datatypes are handled. COALESCE/CASE can add implicit data type conversions whereas ISNULL has simpler rules.

    Edit

    ISNULL in the SELECT list to suppress NULLS is trivial. The main work will done in processing rows and data. An extra ISNULL won't be measurable: Don't optimise prematurely

提交回复
热议问题