This post will demonstrate how to find T-SQL code (SQL Server 2005/2008) that takes the most time to execute. Note that a time consuming code may not necessarily be inefficient; it also depends on the volume of data being processed. --Top 10 codes that takes maximum timeSELECT TOP 10 source_code, stats.total_elapsed_time/1000000 as seconds , last_execution_time from sys.dm_exec_query_stats as
Tidak ada komentar:
Posting Komentar