{"id":652,"date":"2010-10-25T09:21:00","date_gmt":"2010-10-25T09:21:00","guid":{"rendered":"\/blogs\/paul\/post\/Survey-what-is-the-highest-wait-on-your-system.aspx"},"modified":"2019-12-30T17:31:51","modified_gmt":"2019-12-31T01:31:51","slug":"survey-what-is-the-highest-wait-on-your-system","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/","title":{"rendered":"Survey: what is the highest wait on your system?"},"content":{"rendered":"<p><span style=\"font-family: verdana, geneva; font-size: small;\">I&#8217;ve recently been creating some content about wait stats analysis and I think it would be really interesting to see what kind of waits people are seeing out there in the wild. Hopefully it&#8217;ll also introduce a bunch of people to the waits-and-queues performance troubleshooting methodology and how it can be really useful to them.<\/span><\/p>\n<p><strong>[Edit: comments are closed on this post as I have all the info I need &#8211; thanks!]<\/strong><\/p>\n<p><span style=\"font-family: verdana, geneva; font-size: small;\">Here&#8217;s what I&#8217;d like you to do:<\/span><\/p>\n<ul>\n<li>\n<div><span style=\"font-family: verdana, geneva; font-size: small;\">Run the T-SQL query from the end of this post. It&#8217;s completely benign and only reports on statistics that SQL Server is already gathering. It will not cause any perf issues on your production systems.<\/span><\/div>\n<\/li>\n<li>\n<div><span style=\"font-family: verdana, geneva; font-size: small;\">Look at the output &#8211; it&#8217;ll be something like (from random anonymous client system):<\/span><\/div>\n<\/li>\n<\/ul>\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"\/blogs\/paul\/wp-content\/uploads\/2010\/10\/waitsexample.jpg\" alt=\"\" width=\"557\" height=\"178\" \/><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>\n<div><span style=\"font-family: verdana, geneva; font-size: small;\">Look at the top\u00a0WaitType and fill in the simple survey below. If your top wait isn&#8217;t listed, click on Other and cut-and-paste the\u00a0top WaitType into the box provided.<\/span><\/div>\n<\/li>\n<\/ul>\n<p><script>\nem24_survey_x = \"11dcdb6a-0ffe-4b75-9ba5-18adf5e0cc89\";\nem24_survey_width = \"255\";\nem24_survey_height = \"363\";\nem24_styles = \".em24_s {border:solid 1px #626A84; width:250px;} .em24_s td {font-size:12px;} .em24_q {background:#798BC6; color:#ffffff;} .em24_ai0, .em24_at0 {background:#E7F3FF; border-top:1px solid #B3C7D9;} .em24_ai1, .em24_at1 {background:#E3F7DE; border-top:1px solid #B3C7D9;} .em24_v {background:#798BC6}\";<\/script><br \/>\n<script src=\"http:\/\/my.surveypopups.com\/show\/si.js\" type=\"text\/javascript\">\n<\/script><\/p>\n<p><span style=\"font-family: verdana, geneva; font-size: small;\"><u><strong>The free survey system only allows a single vote per IP address<\/strong><\/u> &#8211; if you have any other results, send them in email (<a href=\"mailto:paul@SQLskills.com?Subject=Wait stats\">mailto:paul@SQLskills.com?Subject=Wait stats<\/a>) or attach\u00a0a comment below.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva; font-size: small;\">In a week or two I&#8217;ll report on the results. It would be great to get a few hundred responses.\u00a0<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva; font-size: small;\">Thanks!<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva; font-size: small;\">T-SQL code to run (works on 2005 onwards):<\/span><\/p>\n<blockquote><p><span style=\"font-family: 'courier new', courier; font-size: small;\">WITH Waits AS<br \/>\n(SELECT<br \/>\nwait_type,<br \/>\nwait_time_ms \/ 1000.0 AS WaitS,<br \/>\n(wait_time_ms &#8211; signal_wait_time_ms) \/ 1000.0 AS ResourceS,<br \/>\nsignal_wait_time_ms \/ 1000.0 AS SignalS,<br \/>\nwaiting_tasks_count AS WaitCount,<br \/>\n100.0 * wait_time_ms \/ SUM (wait_time_ms) OVER() AS Percentage,<br \/>\nROW_NUMBER() OVER(ORDER BY wait_time_ms DESC) AS RowNum<br \/>\nFROM sys.dm_os_wait_stats<br \/>\nWHERE wait_type NOT IN (<br \/>\n&#8216;CLR_SEMAPHORE&#8217;, &#8216;LAZYWRITER_SLEEP&#8217;, &#8216;RESOURCE_QUEUE&#8217;, &#8216;SLEEP_TASK&#8217;,<br \/>\n&#8216;SLEEP_SYSTEMTASK&#8217;, &#8216;SQLTRACE_BUFFER_FLUSH&#8217;, &#8216;WAITFOR&#8217;, &#8216;LOGMGR_QUEUE&#8217;,<br \/>\n&#8216;CHECKPOINT_QUEUE&#8217;, &#8216;REQUEST_FOR_DEADLOCK_SEARCH&#8217;, &#8216;XE_TIMER_EVENT&#8217;, &#8216;BROKER_TO_FLUSH&#8217;,<br \/>\n&#8216;BROKER_TASK_STOP&#8217;, &#8216;CLR_MANUAL_EVENT&#8217;, &#8216;CLR_AUTO_EVENT&#8217;, &#8216;DISPATCHER_QUEUE_SEMAPHORE&#8217;,<br \/>\n&#8216;FT_IFTS_SCHEDULER_IDLE_WAIT&#8217;, &#8216;XE_DISPATCHER_WAIT&#8217;, &#8216;XE_DISPATCHER_JOIN&#8217;, &#8216;BROKER_EVENTHANDLER&#8217;,<br \/>\n&#8216;TRACEWRITE&#8217;, &#8216;FT_IFTSHC_MUTEX&#8217;, &#8216;SQLTRACE_INCREMENTAL_FLUSH_SLEEP&#8217;)<br \/>\n)<br \/>\nSELECT<br \/>\nW1.wait_type AS WaitType,<br \/>\nCAST (W1.WaitS AS DECIMAL(14, 2)) AS Wait_S,<br \/>\nCAST (W1.ResourceS AS DECIMAL(14, 2)) AS Resource_S,<br \/>\nCAST (W1.SignalS AS DECIMAL(14, 2)) AS Signal_S,<br \/>\nW1.WaitCount AS WaitCount,<br \/>\nCAST (W1.Percentage AS DECIMAL(4, 2)) AS Percentage<br \/>\nFROM Waits AS W1<br \/>\nINNER JOIN Waits AS W2<br \/>\nON W2.RowNum &lt;= W1.RowNum<br \/>\nGROUP BY W1.RowNum, W1.wait_type, W1.WaitS, W1.ResourceS, W1.SignalS, W1.WaitCount, W1.Percentage<br \/>\nHAVING SUM (W2.Percentage) &#8211; W1.Percentage &lt; 95; &#8212; percentage threshold<br \/>\nGO<\/span><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve recently been creating some content about wait stats analysis and I think it would be really interesting to see what kind of waits people are seeing out there in the wild. Hopefully it&#8217;ll also introduce a bunch of people to the waits-and-queues performance troubleshooting methodology and how it can be really useful to them. [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66,91,101],"tags":[],"class_list":["post-652","post","type-post","status-publish","format-standard","hentry","category-performance-tuning","category-surveys","category-wait-stats"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Survey: what is the highest wait on your system? - Paul S. Randal<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Survey: what is the highest wait on your system? - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"I&#8217;ve recently been creating some content about wait stats analysis and I think it would be really interesting to see what kind of waits people are seeing out there in the wild. Hopefully it&#8217;ll also introduce a bunch of people to the waits-and-queues performance troubleshooting methodology and how it can be really useful to them. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2010-10-25T09:21:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-31T01:31:51+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/\",\"name\":\"Survey: what is the highest wait on your system? - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2010-10-25T09:21:00+00:00\",\"dateModified\":\"2019-12-31T01:31:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Survey: what is the highest wait on your system?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Survey: what is the highest wait on your system? - Paul S. Randal","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/","og_locale":"en_US","og_type":"article","og_title":"Survey: what is the highest wait on your system? - Paul S. Randal","og_description":"I&#8217;ve recently been creating some content about wait stats analysis and I think it would be really interesting to see what kind of waits people are seeing out there in the wild. Hopefully it&#8217;ll also introduce a bunch of people to the waits-and-queues performance troubleshooting methodology and how it can be really useful to them. [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/","og_site_name":"Paul S. Randal","article_published_time":"2010-10-25T09:21:00+00:00","article_modified_time":"2019-12-31T01:31:51+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/","name":"Survey: what is the highest wait on your system? - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2010-10-25T09:21:00+00:00","dateModified":"2019-12-31T01:31:51+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-what-is-the-highest-wait-on-your-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Survey: what is the highest wait on your system?"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=652"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/652\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}