<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cpu Time on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/cpu-time/</link><description>Recent content in Cpu Time on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Fri, 18 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/cpu-time/index.xml" rel="self" type="application/rss+xml"/><item><title>Profile Costly Cached Procs with sys.dm_exec_procedure_stats</title><link>https://www.sqlserver70.com/post/profile-stored-procedure-performance-sys-dm-exec-procedure-stats/</link><pubDate>Fri, 18 Sep 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/profile-stored-procedure-performance-sys-dm-exec-procedure-stats/</guid><description>
&lt;p&gt;A DMV query that grinds to five or ten minutes against a large plan cache is a real failure mode, not a hypothetical one — joining &lt;code&gt;sys.dm_exec_query_stats&lt;/code&gt; to &lt;code&gt;sys.dm_exec_sql_text&lt;/code&gt; row by row scales badly once the cache holds enough plans. &lt;a href="https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-objects/sys-dm-exec-procedure-stats-transact-sql?view=sql-server-ver17"&gt;sys.dm_exec_procedure_stats&lt;/a&gt; exists to sidestep exactly that cost: one row per cached stored procedure, already rolled up by execution count, CPU time, reads, and elapsed time, with an &lt;code&gt;object_id&lt;/code&gt; column that resolves to a name without touching the slow per-statement text function at all.&lt;/p&gt;</description></item></channel></rss>