<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Server Execution Statistics - MSSQL Query</title>
	<atom:link href="https://mssqlquery.com/tag/sql-server-execution-statistics/feed" rel="self" type="application/rss+xml" />
	<link>https://mssqlquery.com</link>
	<description>MSSQL and TSQL Programming and TSQL Examples</description>
	<lastBuildDate>Sat, 21 May 2022 22:08:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.3.1</generator>

<image>
	<url>https://mssqlquery.com/wp-content/uploads/2023/06/cropped-mssql-query-icon-32x32.png</url>
	<title>SQL Server Execution Statistics - MSSQL Query</title>
	<link>https://mssqlquery.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Seeing Procedure Execution Statistics in SQL Server</title>
		<link>https://mssqlquery.com/seeing-procedure-execution-statistics-in-sql-server</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Sat, 21 May 2022 18:35:02 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<category><![CDATA[Execution Statistics in SQL Server]]></category>
		<category><![CDATA[Seeing Procedure Execution Statistics]]></category>
		<category><![CDATA[SQL Server Execution Statistics]]></category>
		<guid isPermaLink="false">https://mssqlquery.com/?p=970</guid>

					<description><![CDATA[<p>Hello to everyone, In this article, I will try to give information about seeing Procedure Execution Statistics in SQL Server. In SQL Server you may want to see Procedure Execution Statistics in some cases. One advantage of Stored Procedures is that performance can be tracked. There may be many Stored&#46;&#46;&#46;</p>
<p>The post <a href="https://mssqlquery.com/seeing-procedure-execution-statistics-in-sql-server">Seeing Procedure Execution Statistics in SQL Server</a> first appeared on <a href="https://mssqlquery.com">MSSQL Query</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Hello to everyone,</p>
<p>In this article, I will try to give information about seeing Procedure Execution Statistics in SQL Server.</p>
<p>In SQL Server you may want to see Procedure Execution Statistics in some cases.</p>
<p>One advantage of Stored Procedures is that performance can be tracked. There may be many Stored Procedures in our database or SQL Server. You may want to see information such as how long they work, their working time, how much resources they use. This information shows us the information from the last run time of SQL Server to the time of writing the query. This information is kept in Memory and Cache. This information is lost when a restart is performed on SQL Server, but it is easy and useful to log the working information of historical Stored Procedures.</p>
<p>You can easily do this using the code below.</p>
<pre class="line-numbers"><code class="language-sql">SELECT database_id,
       object_id,
       OBJECT_NAME(object_id, database_id) AS 'Prosedür Adı',
       cached_time,
       last_execution_time,
       total_elapsed_time,
       (total_elapsed_time / execution_count) AS 'AVG Elapsed Time',
       last_elapsed_time,
       execution_count
FROM sys.dm_exec_procedure_stats
WHERE database_id = DB_ID('AdventureWorks');</code></pre>
<p>When you run the above code, you will see a result similar to the one below.</p>
<p><img decoding="async" fetchpriority="high" class="alignnone wp-image-972 size-full" src="https://mssqlquery.com/wp-content/uploads/2022/05/seeing-procedure-execution-statistics-in-sql-server-1.jpg" alt="Seeing Procedure Execution Statistics in SQL Server" width="700" height="388" srcset="https://mssqlquery.com/wp-content/uploads/2022/05/seeing-procedure-execution-statistics-in-sql-server-1.jpg 700w, https://mssqlquery.com/wp-content/uploads/2022/05/seeing-procedure-execution-statistics-in-sql-server-1-300x166.jpg 300w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>As you can see, we have seen the Procedure Execution Statistics.</p>
<p>Stored Procedure name, last run time, time elapsed when the procedure was run, how many times the procedure ran, etc. We were able to access information such as and show it in tabular form.</p>
<p>Good luck to everyone in business and life.</p>
<div class='epvc-post-count'><span class='epvc-eye'></span>  <span class="epvc-count"> 194</span><span class='epvc-label'> Views</span></div><p>The post <a href="https://mssqlquery.com/seeing-procedure-execution-statistics-in-sql-server">Seeing Procedure Execution Statistics in SQL Server</a> first appeared on <a href="https://mssqlquery.com">MSSQL Query</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
