- SELECT
- qs.total_elapsed_time / qs.execution_count / 1000000.0 AS average_seconds,
- qs.total_elapsed_time / 1000000.0 AS total_seconds,
- qs.execution_count,
- SUBSTRING (qt.text,qs.statement_start_offset/2,
- (CASE WHEN qs.statement_end_offset = -1
- THEN LEN(CONVERT(NVARCHAR(MAX), qt.text)) * 2
- ELSE qs.statement_end_offset END - qs.statement_start_offset)/2) AS individual_query,
- o.name AS object_name,
- DB_NAME(qt.dbid) AS database_name
- FROM sys.dm_exec_query_stats qs
- CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) as qt
- LEFT OUTER JOIN sys.objects o ON qt.objectid = o.object_id
- WHERE qt.dbid = DB_ID()
- ORDER BY average_seconds DESC;
Saturday, 10 June 2017
SQL Query Time Execute Check
Subscribe to:
Post Comments (Atom)
Upload valid file in C#
protected bool CheckFileExtandLength(HttpPostedFile HtmlDocFile) { try { Dictionary<string, byte[]...
-
Setting Header Programatically You can also set the cache headers programmatically. This can be useful for generated content and allows m...
-
CREATE TABLE dbo.M_Bank ( ID INT IDENTITY NOT NULL, MB_NAME NVARCHAR (50), MB_SNAME NVARCHAR (20), MB_ADDUSER ...
-
SELECT distinct(volume_mount_point), total_bytes/1048576 as Size_in_MB, total_bytes/1048576/1024 as Size_in_GB, available_bytes/1048576 ...
No comments:
Post a Comment