SELECT st.text ,last_execution_time ,(last_elapsed_time+0.0)/1000 AS [last_elapsed_time(ms)] ,(min_elapsed_time+0.0)/1000 AS [min_elapsed_time(ms)] ,(max_elapsed_time+0.0)/1000 AS [max_elapsed_time(ms)] ,(total_elapsed_time+0.0)/execution_count/1000 AS [avg_elapsed_time(ms)] ,execution_count FROM sys.dm_exec_query_stats qs WITH(NOLOCK) CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st ORDER BY last_execution_time desc