• Sean Lange (10/16/2013)


    What you have there is called a multi statement table valued function (MTVF). The performance of these can be a killer. Check out this post from Wayne Sheffield on the topic.

    http://www.sqlservercentral.com/blogs/discussionofsqlserver/2012/02/15/comparing-inline-and-multistatement-table-valued-functions/[/url]

    Ok thank you , I will check, and is it possible that the second same started query will be like direct query? 0ms...