Query the list of factors on performance impact

Source: Internet
Author: User
With waits
(
Select wait_type,
Wait_time_ms/1000 as wait_time_s,
100. * wait_time_ms/sum (wait_time_ms) over () as PCT,
Row_number () over (order by wait_time_ms DESC) as Rn
From SYS. dm_ OS _wait_stats
Where wait_type not like '% Sleep %'
)
Select w1.wait _ type,
Cast (w1.wait _ time_s as decimal (12, 2) as wait_time_s,
Cast (w1.pct as decimal (12,2) as PCT, -- w2.pct, w1.rn, w2.rn
Cast (sum (w2.pct) as decimal (12,2) as running_pct
From waits W1 join waits W2
On w1.rn <= w2.rn
Group by w1.rn, w1.wait _ type, w1.wait _ time_s, w1.pct
Having sum (w2.pct)-w1.pct <90
Order by w1.rn

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.