zoukankan      html  css  js  c++  java
  • sqlserver查询最大的SQL开销语句

    --查询前20条
    SELECT TOP 20 SUBSTRING(qt.text, (qs.statement_start_offset/2)+1, ((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(qt.text) ELSE qs.statement_end_offset END - qs.statement_start_offset)/2)+1), qs.execution_count, qs.total_logical_reads, qs.last_logical_reads, qs.min_logical_reads, qs.max_logical_reads, qs.total_elapsed_time, qs.last_elapsed_time, qs.min_elapsed_time, qs.max_elapsed_time, qs.last_execution_time, qp.query_plan FROM sys.dm_exec_query_stats qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) qt CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp WHERE qt.encrypted=0 order by last_execution_time desc --ORDER BY qs.total_logical_reads DESC
  • 相关阅读:
    查看Linux内核版本命令
    身份证测试用
    aaa
    aaaaaaaaaaaaaaa
    https
    httpclient调用https
    共阴极数码管编码
    时间单位换算
    Java 中System里getProperty(something)
    VM arguments
  • 原文地址:https://www.cnblogs.com/dushaojun/p/12987374.html
Copyright © 2011-2022 走看看