Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sys.dm_exec_query_stats Expand / Collapse
Author
Message
Posted Tuesday, November 27, 2012 2:57 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Yesterday @ 5:45 PM
Points: 79, Visits: 616
Is there a way to get sys.dm_exec_query_stats

These below in minutes or more readable time?

,max_logical_reads
,total_worker_time/execution_count

,total_elapsed_time/execution_count

Thanks in advance
Post #1389427
Posted Tuesday, November 27, 2012 3:36 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Yesterday @ 5:45 PM
Points: 79, Visits: 616
not this only the others
max_logical_reads

I couldnt figured out how to edit my post

Im trying to get them into minutes

Post #1389437
Posted Wednesday, November 28, 2012 5:40 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 25, 2014 3:31 AM
Points: 194, Visits: 717
You can simply divide the values in the select list. In this example I return the time-values in seconds.

declare
@DividerMicroSecondsToMinutes int = 60000000
select total_elapsed_time / @DividerMicroSecondsToMinutes
from sys.dm_exec_query_stats

Same thing for the reads. Just choose a divider and use it in the select list.
Post #1389671
Posted Wednesday, November 28, 2012 8:44 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Yesterday @ 5:45 PM
Points: 79, Visits: 616
Thank you
Post #1389855
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse