Query plan for scalar UDF not displaying in my execution plan

  • Hello,

    I am running SQL Server 2016 SP2 with 130 compatibility mode. SSMS version 18.5

    My understanding is if I run a query that calls a scalar udf, my execution plan  will have a double-pane, with the top pane having my exec plan with the Compute Scalar operation.  And there will be a bottom pane showing the query plan of my scalar UDF.

    But I am not seeing this bottom pane.  Does anyone know why this may be?

    Thanks J

     

    • This topic was modified 4 years, 4 months ago by  dbgaragedays.
    • This topic was modified 4 years, 4 months ago by  dbgaragedays.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • You'll always have single plan for single statement. Stored procedures can have several queries so there could be several plans. This is not the case with scalar functions.

    Common practice is to avoid scalar functions in queries as their performance usually is bad. In most cases you can convert scalar functions into inline function that would give you better performance and you'll see everything it is doing in the plan.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply