sqlserver定位消耗資源比較高的sql,sqlserver定位sql

來源:互聯網
上載者:User

sqlserver定位消耗資源比較高的sql,sqlserver定位sql

sqlserver查看消耗資源的sql ,具體如下:


可以使用SQL 快速定位元據庫裡CPU,IO 消耗比較高的SQL:

1. 定位消耗cpu,io 最高的進程資訊

selectspid,dbid,cpu,physical_io,login_time,last_batch,status,

hostname,program_name,hostprocess,cmd,nt_usernamefrom sysprocesses order by cpu,physical_io desc;

 

2. 定位該進程執行的 SQL 陳述式

      select name ,dbid from sysdatabases wheredbid=&dbid;

     到查到的 db 裡執行:

     dbcc inputbuffer(&spid);


也可以從事件探查器查看sql的執行計畫


SQL server 2005 查詢器快速定位字元或表

裝外掛程式,比如:Sql assistant 或 Sql prompt
網上有破解版
 
SQL Server 2005標準版與開發版哪個佔得電腦資源多?

會的,建議安裝一鍵還原,使用開發版吧,功能多,安裝這個資料庫軟體會產生系統日誌,會佔用系統空間,如果不安裝一鍵還原,即使卸載了,也不能清乾淨系統的。
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.