Take the tour ×  Can any body help me in understanding if the
execution plan for functions cached in SQL server?  Any online
resource for this?  Thanks Ashwani  share|improve this question
add comment  2 Answers  up vote 4 down vote accepted  Yes they
do go in the execution plan cache.  The sys.dm_exec_query_plan
DMV will show a plan for given plan handle. Quote from there:
Query plans for various types of Transact-SQL batches, such as
ad hoc batches, stored procedures, and user-defined functions,
are cached in an area of memory called the plan cache. Each
cached query plan is identified by a unique identifier called a
plan handle. You can specify this plan handle with the
sys.dm_exec_query_plan dynamic management view to retrieve the
execution plan for a particular Transact-SQL query or batch.
share|improve this answer add comment  Yes they are considered
for caching.   share|improve this answer Thanks, but in the link
it is not written that user defined functions are also
considered for plan caching? –  A