July 28, 2014 at 12:40 pm
Comments posted to this topic are about the item Find Most Expensive Stored PROCEDURE
SQL Server Consultant
yusufkahveci@sqlturkiye.com
www.sqlturkiye.com
August 14, 2014 at 8:36 am
The title is suggesting the most expensive, but you're actually reporting the most used SPs, which is not by default the most expensive. I suggest to rename the title
Wilfred
The best things in life are the simple things
May 21, 2015 at 1:39 pm
Wilfred van Dijk (8/14/2014)
The title is suggesting the most expensive, but you're actually reporting the most used SPs, which is not by default the most expensive. I suggest to rename the title
I agree.
September 8, 2015 at 7:39 am
I agree the word "expensive" is ambiguous by itself. You can report expense in terms of CPU usage, I/O, etc. This query doesn't report expense in those terms. Still, I like collecting DMV queries, and I simply saved this one with a name describing its true use, finding most frequently executed procs.
September 8, 2015 at 9:46 am
September 8, 2015 at 3:18 pm
Thanks, but I think I've seen this before.
September 23, 2015 at 1:22 am
There's already a dmv for procedure stats.
SELECTDBName= DB_NAME(database_id)
, SPName= OBJECT_NAME([object_id], database_id)
, ExecCnt= execution_count
, TotalTime= total_worker_time
, TotalReads= total_physical_reads
--.... Heaps of columns
FROMsys.dm_exec_procedure_stats
WHEREdatabase_id < 32767
ORDERBY execution_count DESC
January 18, 2018 at 4:33 am
Plagiarized from here, which was published in 2011.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply