Question

I have this query on SQL server, a merge replication query:

SELECT DISTINCT
    b.tablenick,
    b.rowguid,
    c.generation,
    sys.fn_MSgeneration_downloadonly
    (
        c.generation,
        c.tablenick
    )
FROM #belong b
LEFT OUTER JOIN dbo.MSmerge_contents c ON 
    c.tablenick = b.tablenick
    AND c.rowguid = b.rowguid;

The estimated query plan includes information about 3 queries:

  1. The query above
  2. The function call to fn_MSgeneration_downloadonly
  3. The function call to fn_MSArticle_has_downloadonly_property

The actual query plan includes only this information:

  1. The query above

Nothing about the functions. Why is the function information missing in the actual plan?

I tried these options:

SET STATISTICS PROFILE ON
SET STATISTICS XML ON

Which created an actual plan, but it was missing parts 2 and 3 same as when I used the actual query plan option in Management Studio.

If for instance I was to use Profiler to capture the information about the function calls what events would I select?


Didn't find an answer specifically related to the query plans, but I profiled SP:StmtStarting and SP:StmtCompleted and it showed the function calls.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top