{"id":4192,"date":"2013-08-25T15:42:25","date_gmt":"2013-08-25T22:42:25","guid":{"rendered":"http:\/\/3.209.169.194\/blogs\/paul\/?p=4192"},"modified":"2013-08-27T10:57:17","modified_gmt":"2013-08-27T17:57:17","slug":"survey-tempdb-and-transaction-log-io-latencies","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/","title":{"rendered":"Survey: tempdb and transaction log IO latencies"},"content":{"rendered":"<p>Time for another survey!<\/p>\n<p>This survey\u2019s very simple: run the following code on as many of your <span style=\"text-decoration: underline;\">production<\/span> instances as you can, and post a comment with the results or send me plain text\/spreadsheet output in an\u00a0<a href=\"mailto:paul@sqlskills.com?subject=Latency Survey\" target=\"_blank\">email<\/a>.\u00a0Please do not add any more info to the results (like server name, commas, lines) as it\u2019s not relevant for this survey and adds a bunch of time to the results processing.<\/p>\n<p>Results are good until 9\/6\/13 at least &#8211; keep &#8217;em coming!<\/p>\n<pre class=\"brush: sql; title: ; toolbar: true; wrap-lines: true; notranslate\" title=\"\">\r\nSELECT\r\n\t&#x5B;database_id],\r\n\t&#x5B;file_id],\r\n    &#x5B;ReadLatency] =\r\n\t\tCASE WHEN &#x5B;num_of_reads] = 0\r\n\t\t\tTHEN 0 ELSE (&#x5B;io_stall_read_ms] \/ &#x5B;num_of_reads]) END,\r\n\t&#x5B;WriteLatency] =\r\n\t\tCASE WHEN &#x5B;num_of_writes] = 0\r\n\t\t\tTHEN 0 ELSE (&#x5B;io_stall_write_ms] \/ &#x5B;num_of_writes]) END\r\nFROM\r\n\tsys.dm_io_virtual_file_stats (NULL, NULL)\r\nWHERE\r\n\t&#x5B;file_id] = 2 OR &#x5B;database_id] = 2;\r\nGO\r\n<\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: true; wrap-lines: true; notranslate\" title=\"\">\r\ndatabase_id file_id ReadLatency          WriteLatency\r\n----------- ------- -------------------- --------------------\r\n1           2       0                    2\r\n2           1       0                    6\r\n2           2       0                    1\r\n3           2       7                    9\r\n4           2       10                   0\r\n5           2       1                    1\r\n7           2       6                    1\r\n8           2       15                   55\r\n9           2       13                   59\r\n10          2       0                    0\r\n11          2       44                   8\r\n<\/pre>\n<p><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;\"><br \/>\nI&#8217;ll editorialize the results in a couple of weeks.<\/span><\/p>\n<p>Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Time for another survey! This survey\u2019s very simple: run the following code on as many of your production instances as you can, and post a comment with the results or send me plain text\/spreadsheet output in an\u00a0email.\u00a0Please do not add any more info to the results (like server name, commas, lines) as it\u2019s not relevant [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[],"class_list":["post-4192","post","type-post","status-publish","format-standard","hentry","category-surveys"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Survey: tempdb and transaction log IO latencies - 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-tempdb-and-transaction-log-io-latencies\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Survey: tempdb and transaction log IO latencies - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"Time for another survey! This survey\u2019s very simple: run the following code on as many of your production instances as you can, and post a comment with the results or send me plain text\/spreadsheet output in an\u00a0email.\u00a0Please do not add any more info to the results (like server name, commas, lines) as it\u2019s not relevant [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-25T22:42:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-08-27T17:57:17+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=\"1 minute\" \/>\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-tempdb-and-transaction-log-io-latencies\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/\",\"name\":\"Survey: tempdb and transaction log IO latencies - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2013-08-25T22:42:25+00:00\",\"dateModified\":\"2013-08-27T17:57:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Survey: tempdb and transaction log IO latencies\"}]},{\"@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: tempdb and transaction log IO latencies - 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-tempdb-and-transaction-log-io-latencies\/","og_locale":"en_US","og_type":"article","og_title":"Survey: tempdb and transaction log IO latencies - Paul S. Randal","og_description":"Time for another survey! This survey\u2019s very simple: run the following code on as many of your production instances as you can, and post a comment with the results or send me plain text\/spreadsheet output in an\u00a0email.\u00a0Please do not add any more info to the results (like server name, commas, lines) as it\u2019s not relevant [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/","og_site_name":"Paul S. Randal","article_published_time":"2013-08-25T22:42:25+00:00","article_modified_time":"2013-08-27T17:57:17+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/","name":"Survey: tempdb and transaction log IO latencies - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2013-08-25T22:42:25+00:00","dateModified":"2013-08-27T17:57:17+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-tempdb-and-transaction-log-io-latencies\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Survey: tempdb and transaction log IO latencies"}]},{"@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\/4192","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=4192"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/4192\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=4192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=4192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=4192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}