摘要:
select total_elapsed_time / execution_count 平均时间,total_logical_reads/execution_count 逻辑读,usecounts 重用次数,SUBSTRING(d.text, (statement_start_offset/2) + 1, ((CASE statement_end_offset WHEN -1 THEN DATALENGTH(text) ELSE statement_end_offset END - statement_start_offset)/2) + 1) 语句执行 from sys.dm_exec_.. 阅读全文
摘要:
declare @dbid intselect @dbid = db_id()select objectname=object_name(s.object_id), s.object_id, indexname=i.name, i.index_id , user_seeks, user_scans, user_lookups, user_updatesfrom sys.dm_db_index_usage_stats s, sys.indexes iwhere database_id = @dbid and objectproperty(s.object_id,'IsUserTable& 阅读全文