inner join Vs scalar Function

前端 未结 4 1985
太阳男子
太阳男子 2020-12-31 07:15

Which of the following query is better... This is just an example, there are numerous situations, where I want the user name to be displayed instead of UserID



        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 08:05

    Scalar UDFs are very slow, but the inline ones are much faster, typically as fast as joins and subqueries

    BTW, you query with function calls is equivalent to an outer join, not to an inner one.

提交回复
热议问题