Skip to content

Instantly share code, notes, and snippets.

@ronascentes
Created January 16, 2019 17:29
Show Gist options
  • Save ronascentes/07eaec984921cf4c8388f0fcecf135d0 to your computer and use it in GitHub Desktop.
Save ronascentes/07eaec984921cf4c8388f0fcecf135d0 to your computer and use it in GitHub Desktop.
Get execution times
SELECT DB_NAME(database_id) DatabaseName,
OBJECT_NAME(object_id) ProcedureName,
cached_time, last_execution_time, execution_count,
total_elapsed_time/execution_count AS avg_elapsed_time,
type_desc, datetime=getdate()
FROM sys.dm_exec_procedure_stats
where database_id=6
and OBJECT_NAME(object_id)='ProcExtendedSessionUpsertV5'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment