{"id":606,"date":"2011-02-22T15:03:00","date_gmt":"2011-02-22T15:03:00","guid":{"rendered":"\/blogs\/paul\/post\/Survey-how-is-your-tempdb-configured.aspx"},"modified":"2017-04-13T09:53:38","modified_gmt":"2017-04-13T16:53:38","slug":"survey-how-is-your-tempdb-configured","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/","title":{"rendered":"Survey: how is your tempdb configured?"},"content":{"rendered":"<p>\n<font face=\"verdana,geneva\" size=\"2\">In this week&#39;s survey, I want to know how you&#39;ve got tempdb configured compared to the number of processor cores SQL Server thinks it has. I&#39;ll correlate, analyze, and present the results like the <\/font><a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/log-file-configuration-metrics-for-17000-databases\/\"><font face=\"verdana,geneva\" size=\"2\">log file survey<\/font><\/a><font face=\"verdana,geneva\" size=\"2\"> I did last year where I got results for 17000 databases.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">The code I&#39;d like you to run is as follows:<\/font>\n<\/p>\n<blockquote>\n<p>\n\t<font face=\"courier new,courier\" size=\"2\">SELECT os.Cores, df.Files<br \/>\n\tFROM<br \/>\n\t&nbsp;&nbsp; (SELECT COUNT(*) AS Cores FROM sys.dm_os_schedulers&nbsp;WHERE status = &#39;VISIBLE ONLINE&#39;) AS os,<br \/>\n\t&nbsp;&nbsp; (SELECT COUNT(*) AS Files FROM tempdb.sys.database_files&nbsp;WHERE type_desc = &#39;ROWS&#39;) AS df;<br \/>\n\tGO<\/font>\n\t<\/p>\n<\/blockquote>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">It works on 2005 onwards (thanks to Robert Davis (<\/font><a href=\"http:\/\/www.sqlsoldier.com\/wp\/\"><font face=\"verdana,geneva\" size=\"2\">blog<\/font><\/a>|<a href=\"https:\/\/twitter.com\/sqlsoldier\"><font face=\"verdana,geneva\" size=\"2\">twitter<\/font><\/a><font face=\"verdana,geneva\" size=\"2\">)&nbsp;for doing a quick 2005 test for me).<\/font>\n<\/p>\n<p>\n<font size=\"2\">I&#39;ll take as many results as you can be bothered gathering for me &#8211; anywhere from 1 to 100s!<\/font>\n<\/p>\n<p>\n<font size=\"2\">To help you out, Eric Humphrey (<a href=\"http:\/\/www.erichumphrey.com\/\">blog<\/a>|<a href=\"https:\/\/twitter.com\/lotsahelp\">twitter<\/a>), who&#39;s in our class this week, put together a PowerShell script to help you run the code against multiple servers. See <a href=\"http:\/\/www.erichumphrey.com\/2011\/02\/posh-tempdb-config\/\">here<\/a> &#8211; very cool!<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">Either add your results as a comment or <\/font><a href=\"mailto:paul@sqlskills.com?subject=Tempdb Survey Results\"><font face=\"verdana,geneva\" size=\"2\">drop me a mail<\/font><\/a><font face=\"verdana,geneva\" size=\"2\"> with the results. Feel free to add in any explanation you want as to the reasoning for your setup. Everything will remain anonymous as always.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">I&#39;ll report on the results in a week or two.<\/font>\n<\/p>\n<p>\n<font size=\"2\">[Edit: the survey is now closed.]<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">Thanks!<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this week&#39;s survey, I want to know how you&#39;ve got tempdb configured compared to the number of processor cores SQL Server thinks it has. I&#39;ll correlate, analyze, and present the results like the log file survey I did last year where I got results for 17000 databases. The code I&#39;d like you to run [&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,93],"tags":[],"class_list":["post-606","post","type-post","status-publish","format-standard","hentry","category-performance-tuning","category-surveys","category-tempdb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Survey: how is your tempdb configured? - 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-how-is-your-tempdb-configured\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Survey: how is your tempdb configured? - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"In this week&#039;s survey, I want to know how you&#039;ve got tempdb configured compared to the number of processor cores SQL Server thinks it has. I&#039;ll correlate, analyze, and present the results like the log file survey I did last year where I got results for 17000 databases. The code I&#039;d like you to run [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2011-02-22T15:03:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-13T16:53:38+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-how-is-your-tempdb-configured\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/\",\"name\":\"Survey: how is your tempdb configured? - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2011-02-22T15:03:00+00:00\",\"dateModified\":\"2017-04-13T16:53:38+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Survey: how is your tempdb configured?\"}]},{\"@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: how is your tempdb configured? - 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-how-is-your-tempdb-configured\/","og_locale":"en_US","og_type":"article","og_title":"Survey: how is your tempdb configured? - Paul S. Randal","og_description":"In this week&#39;s survey, I want to know how you&#39;ve got tempdb configured compared to the number of processor cores SQL Server thinks it has. I&#39;ll correlate, analyze, and present the results like the log file survey I did last year where I got results for 17000 databases. The code I&#39;d like you to run [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/","og_site_name":"Paul S. Randal","article_published_time":"2011-02-22T15:03:00+00:00","article_modified_time":"2017-04-13T16:53:38+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-how-is-your-tempdb-configured\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/","name":"Survey: how is your tempdb configured? - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2011-02-22T15:03:00+00:00","dateModified":"2017-04-13T16:53:38+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-how-is-your-tempdb-configured\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Survey: how is your tempdb configured?"}]},{"@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\/606","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=606"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/606\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}