SQLRx® Tip of the Month
 
February 2016
______________________________________________________________________________
SQL 2008

SQL Server Performance Tuning: New function in SQL 2016: sys.dm_exec_function_stats

Returns performance statistics for cached functions. Returns information about scalar functions, including in-memory functions and CLR scalar functions but not about table valued functions. The view returns one row for each cached function plan, and the lifetime of the row is as long as the function remains in memory. When a function is removed from the cache, the corresponding plan is no longer available in the view.

SELECT [object_id],
       [database_id],
       OBJECT_NAME(object_id, database_id) 'function name',
cached_time,
       last_execution_time,
       total_elapsed_time,
total_elapsed_time/execution_count AS [avg_elapsed_time],
last_elapsed_time,
       execution_count,
       total_physical_reads,
       total_logical_writes,
       total_logical_reads,
       total_worker_time
FROM sys.dm_exec_function_stats AS
ORDER BY [total_logical_reads] DESC

More information from Microsoft is here.
___________________________________________________________________________
SQLRx has worked hard to minimize the impact of monitoring SQL Servers to the point that we are able to monitor high transaction systems with little impact (1% load) on the target system. Contact us today to help you monitor your SQL servers!
Be sure to check out our blog for more SQL Server information.

If you have a SQL question you'd like us to answer, and possibly use for the next SQLRx Tip of the Month, email it to us!  If you missed any of our previous tips, you can view them here.

For assistance or more information on optimizing your SQL Server Environment, visit us at www.sqlrx.com or email Chima Egwuagu at chimae@isi85.com.


 

Phone: 214.526.7680 x 111

Toll free:  800.85.SQLRx  (x111)

blog.sqlrx.com

@SQLRx

Facebook
 


 

Integrated Services, Inc.                                    
2008 winner logo small
Turning Data Into Profit


 

30 Years of Credibility & Trust


 

Join our email list          Check out our events