{"id":647,"date":"2014-05-02T07:00:14","date_gmt":"2014-05-02T14:00:14","guid":{"rendered":"http:\/\/3.209.169.194\/blogs\/erin\/?p=647"},"modified":"2014-05-02T20:21:13","modified_gmt":"2014-05-03T03:21:13","slug":"testing-automatic-updates-statistics","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/","title":{"rendered":"Further Testing with Automatic Updates to Statistics"},"content":{"rendered":"<p>A new question on an older post, <a title=\"Understanding When Statistics Will Automatically Update\" href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/understanding-when-statistics-will-automatically-update\/\">Understanding When Statistics Will Automatically Update<\/a>, came in this week.\u00a0 If you look in the comments, you see that Rajendra asks:<\/p>\n<blockquote><p>&#8230;I want know, whether schema change of a table (adding new \/ (deleting an existing) column) also qualifies for UPDATE STATS?<\/p><\/blockquote>\n<p>It&#8217;s an interesting question that I&#8217;d never considered before.\u00a0 I had an instinct about the answer, but the scientist in me wanted to test and prove it, so here we go.\u00a0 The scenario and code are similar to my original post, so this should be a quick read for many of you \ud83d\ude42<cite><br \/>\n<\/cite><\/p>\n<p><strong>The Setup<\/strong><\/p>\n<p>Start with a copy of the <code>AdventureWorks2012<\/code> database, which you can download from <a title=\"SQL Server databases on Code Plex\" href=\"https:\/\/msftdbprodsamples.codeplex.com\/\" class=\"broken_link\">CodePlex<\/a>, on a 2012 SP1 instance, and confirm that the <b>Auto Update Statistics <\/b>option is enabled:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">IF (SELECT COUNT(*) FROM &#x5B;sys].&#x5B;databases] WHERE &#x5B;name] = 'AdventureWorks2012' AND &#x5B;is_auto_create_stats_on] = 0) = 0\r\nBEGIN\r\nALTER DATABASE &#x5B;AdventureWorks2012] SET AUTO_UPDATE_STATISTICS ON\r\nEND;<\/pre>\n<p>Create a copy of the Sales.SalesOrderDemo table for our testing, and add the clustered index and one nonclustered index:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nUSE &#x5B;AdventureWorks2012];\r\nGO\r\n\r\nSELECT *\r\nINTO &#x5B;Sales].&#x5B;TestSalesOrderDetail]\r\nFROM &#x5B;Sales].&#x5B;SalesOrderDetail];\r\nGO\r\n\r\nCREATE CLUSTERED INDEX &#x5B;PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID] ON &#x5B;Sales].&#x5B;TestSalesOrderDetail] (&#x5B;SalesOrderID], &#x5B;SalesOrderDetailID]);\r\nGO\r\n\r\nCREATE NONCLUSTERED INDEX &#x5B;IX_TestSalesOrderDetail_ProductID] ON &#x5B;Sales].&#x5B;TestSalesOrderDetail] (&#x5B;ProductID]);\r\nGO\r\n<\/pre>\n<p>Validate the current statistics and modifications; the statistics should be current since we just created the indexes, and modifications should be 0 since we haven&#8217;t run any inserts, updates, or deletes:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\n\/*\r\nNote: I refer to this query throughout the post as &quot;the sys.stats query&quot;, rather than including it multiple times!\r\n*\/\r\nSELECT\r\nOBJECT_NAME(&#x5B;sp].&#x5B;object_id]) AS &quot;Table&quot;,\r\n&#x5B;sp].&#x5B;stats_id] AS &quot;Statistic ID&quot;,\r\n&#x5B;s].&#x5B;name] AS &quot;Statistic&quot;,\r\n&#x5B;sp].&#x5B;last_updated] AS &quot;Last Updated&quot;,\r\n&#x5B;sp].&#x5B;rows],\r\n&#x5B;sp].&#x5B;rows_sampled],\r\n&#x5B;sp].&#x5B;unfiltered_rows],\r\n&#x5B;sp].&#x5B;modification_counter] AS &quot;Modifications&quot;\r\nFROM &#x5B;sys].&#x5B;stats] AS &#x5B;s]\r\nOUTER APPLY sys.dm_db_stats_properties (&#x5B;s].&#x5B;object_id],&#x5B;s].&#x5B;stats_id]) AS &#x5B;sp]\r\nWHERE &#x5B;s].&#x5B;object_id] = OBJECT_ID(N'Sales.TestSalesOrderDetail');\r\n<\/pre>\n<figure id=\"attachment_652\" aria-describedby=\"caption-attachment-652\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/1.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-large wp-image-652 \" alt=\"Current statistics and no modifications\" src=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/1-1024x56.png\" width=\"1024\" height=\"56\" srcset=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/1-1024x56.png 1024w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/1-300x16.png 300w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/1-900x49.png 900w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/1.png 1383w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-652\" class=\"wp-caption-text\">Current statistics and no modifications<\/figcaption><\/figure>\n<p>Excellent, we&#8217;re starting with a clean slate.<\/p>\n<p><strong>The Test<\/strong><\/p>\n<p>Let&#8217;s first add a little bit of data (1000 rows), to up our modification count:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nBULK INSERT &#x5B;AdventureWorks2012].&#x5B;Sales].&#x5B;TestSalesOrderDetail]\r\nFROM 'S:\\SQLStuff\\Dropbox\\Statistics\\Data\\sod_1000.txt'\r\nWITH\r\n(\r\nDATAFILETYPE = 'native',\r\nTABLOCK\r\n);\r\n<\/pre>\n<p>When we run our <code>sys.stats<\/code> query again, we see the 1000 modifications for both indexes, because <em>both<\/em> indexes had rows added:<\/p>\n<figure id=\"attachment_653\" aria-describedby=\"caption-attachment-653\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/2.png\"><img decoding=\"async\" class=\"size-large wp-image-653 \" alt=\"Statistics and modifications after adding 1000 rows\" src=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/2-1024x56.png\" width=\"1024\" height=\"56\" srcset=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/2-1024x56.png 1024w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/2-300x16.png 300w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/2-900x49.png 900w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/2.png 1383w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-653\" class=\"wp-caption-text\">Statistics and modifications after adding 1000 rows<\/figcaption><\/figure>\n<p>Great.\u00a0 Now add a new column to the table&#8230;let&#8217;s pretend that we have a new ProductID, but we want to keep the existing one for historical reasons, so our new column is, creatively, NewProductID:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nALTER TABLE &#x5B;Sales].&#x5B;TestSalesOrderDetail] ADD &#x5B;NewProductID] INT;\r\n<\/pre>\n<p>Did adding this column cause statistics to update?\u00a0 This was our main question, and if we run our <code>sys.stats<\/code> query we see:<\/p>\n<figure id=\"attachment_654\" aria-describedby=\"caption-attachment-654\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/3.png\"><img decoding=\"async\" class=\"size-large wp-image-654 \" alt=\"Statistics and modifications after adding new column\" src=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/3-1024x56.png\" width=\"1024\" height=\"56\" srcset=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/3-1024x56.png 1024w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/3-300x16.png 300w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/3-900x49.png 900w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/3.png 1383w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-654\" class=\"wp-caption-text\">Statistics and modifications after adding new column<\/figcaption><\/figure>\n<p>Nothing changed&#8230;\u00a0 Adding a new column to the table does not invoke an automatic update to statistics.\u00a0 Nor should it.\u00a0 We haven&#8217;t modified data in any <em>existing<\/em> statistics.\u00a0 We would certainly expect a change in query plans, for existing queries that are modified to use this new column, but adding a new column to a table does not cause any existing statistics for the table to update.<\/p>\n<p><strong>More Testing (because it&#8217;s good practice to keep proving out what we expect)<\/strong><\/p>\n<p>Just for fun, let&#8217;s see what happens if we modify some more data:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nUPDATE Sales.TestSalesOrderDetail SET ProductID = 717 WHERE SalesOrderID = 75123;\r\nGO\r\n<\/pre>\n<p>If we check <code>sys.stats<\/code>, we see that our nonclustered index, IX_TestSalesOrderDetail_ProductID, has three more modifications than it had previously, but not enough data has changed overall for statistics to be invalidated.<\/p>\n<figure id=\"attachment_655\" aria-describedby=\"caption-attachment-655\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-655 \" title=\"Statisitics and modifications after updating 3 ProductIDs\" alt=\"Statisitics and modifications after updating 3 ProductIDs\" src=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/4-1024x56.png\" width=\"1024\" height=\"56\" srcset=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/4-1024x56.png 1024w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/4-300x16.png 300w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/4-900x49.png 900w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/4.png 1383w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-655\" class=\"wp-caption-text\">Statisitics and modifications after updating 3 ProductIDs<\/figcaption><\/figure>\n<p>What happens if we update NewProductID?<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nUPDATE &#x5B;Sales].&#x5B;TestSalesOrderDetail]\r\nSET &#x5B;NewProductID] = &#x5B;ProductID] + 1000;\r\n<\/pre>\n<p>Well, we updated 122317 rows, but only the NewProductID column, which isn&#8217;t part of either the clustered index or nonclustered index key.\u00a0 Therefore, no update to statistics:<\/p>\n<figure id=\"attachment_656\" aria-describedby=\"caption-attachment-656\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-656 \" title=\"Statistics and modifications after updating NewProductID\" alt=\"Statistics and modifications after updating NewProductID\" src=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/5-1024x56.png\" width=\"1024\" height=\"56\" srcset=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/5-1024x56.png 1024w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/5-300x16.png 300w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/5-900x49.png 900w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/5.png 1383w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-656\" class=\"wp-caption-text\">Statistics and modifications after updating NewProductID<\/figcaption><\/figure>\n<p>To prove this out further, create a nonclustered index on NewProductID:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nCREATE NONCLUSTERED INDEX &#x5B;NCI_TestSalesOrderDetail_NewProductID] ON &#x5B;Sales].&#x5B;TestSalesOrderDetail] (&#x5B;NewProductID]);\r\nGO\r\n<\/pre>\n<p>And if we verify the statistics and modifications, we see that our new NCI has zero modifications, as expected.<\/p>\n<figure id=\"attachment_657\" aria-describedby=\"caption-attachment-657\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-657 \" title=\"Statistics and updates after adding the nonclustered index on NewProductID\" alt=\"Statistics and updates after adding the nonclustered index on NewProductID\" src=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/6-1024x74.png\" width=\"1024\" height=\"74\" srcset=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/6-1024x74.png 1024w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/6-300x21.png 300w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/6-900x65.png 900w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/6.png 1383w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-657\" class=\"wp-caption-text\">Statistics and updates after adding the nonclustered index on NewProductID<\/figcaption><\/figure>\n<p>We&#8217;ll make another massive update to NewProductID, because the first update wasn&#8217;t correct, and then check <code>sys.stats<\/code> again:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nUPDATE &#x5B;Sales].&#x5B;TestSalesOrderDetail]\r\nSET &#x5B;NewProductID] = &#x5B;ProductID] + 10000;\r\n<\/pre>\n<figure id=\"attachment_658\" aria-describedby=\"caption-attachment-658\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-658 \" title=\"Statistics and modifications after updating NewProductID a second time\" alt=\"Statistics and modifications after updating NewProductID a second time\" src=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/7-1024x74.png\" width=\"1024\" height=\"74\" srcset=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/7-1024x74.png 1024w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/7-300x21.png 300w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/7-900x65.png 900w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/7.png 1383w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-658\" class=\"wp-caption-text\">Statistics and modifications after updating NewProductID a second time<\/figcaption><\/figure>\n<p>Now we see the modifications &#8211; all 122317 of them.\u00a0 If we query the NewProductID column now, we should invoke an automatic update to statistics, because they are invalid:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nSELECT NewProductID, SalesOrderID\r\nFROM &#x5B;Sales].&#x5B;TestSalesOrderDetail]\r\nWHERE NewProductID = 10718;\r\n<\/pre>\n<figure id=\"attachment_659\" aria-describedby=\"caption-attachment-659\" style=\"width: 1024px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-659 \" title=\"Statistics and modifications after an auto update was invoked\" alt=\"Statistics and modifications after an auto update was invoked\" src=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/8-1024x74.png\" width=\"1024\" height=\"74\" srcset=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/8-1024x74.png 1024w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/8-300x21.png 300w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/8-900x65.png 900w, https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/8.png 1383w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-659\" class=\"wp-caption-text\">Statistics and modifications after an auto update was invoked<\/figcaption><\/figure>\n<p>And there you have it.\u00a0 Adding a column to a table will not cause an automatic update to statistics to occur.\u00a0 Automatic updates occur only when the threshold for modifications has been exceeded for a statistics key.<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\n\/*\r\nclean up code\r\n*\/\r\nUSE &#x5B;AdventureWorks2012];\r\nGO\r\nDROP TABLE &#x5B;Sales].&#x5B;TestSalesOrderDetail];\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A new question on an older post, Understanding When Statistics Will Automatically Update, came in this week.\u00a0 If you look in the comments, you see that Rajendra asks: &#8230;I want know, whether schema change of a table (adding new \/ (deleting an existing) column) also qualifies for UPDATE STATS? It&#8217;s an interesting question that I&#8217;d [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Further Testing with Automatic Updates to Statistics - Erin Stellato<\/title>\n<meta name=\"description\" content=\"Changes in data distribution invalidate statistics and cause automatic updates, does adding a column to a table do the same? Read on to find out...\" \/>\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\/erin\/testing-automatic-updates-statistics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Further Testing with Automatic Updates to Statistics - Erin Stellato\" \/>\n<meta property=\"og:description\" content=\"Changes in data distribution invalidate statistics and cause automatic updates, does adding a column to a table do the same? Read on to find out...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/\" \/>\n<meta property=\"og:site_name\" content=\"Erin Stellato\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-02T14:00:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-05-03T03:21:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/1-1024x56.png\" \/>\n<meta name=\"author\" content=\"Erin Stellato\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Erin Stellato\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/\",\"name\":\"Further Testing with Automatic Updates to Statistics - Erin Stellato\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/#website\"},\"datePublished\":\"2014-05-02T14:00:14+00:00\",\"dateModified\":\"2014-05-03T03:21:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/#\/schema\/person\/76170223ffffa1df03fd9be5b66cb158\"},\"description\":\"Changes in data distribution invalidate statistics and cause automatic updates, does adding a column to a table do the same? Read on to find out...\",\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Further Testing with Automatic Updates to Statistics\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/\",\"name\":\"Erin Stellato\",\"description\":\"The SQL Sequel\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/#\/schema\/person\/76170223ffffa1df03fd9be5b66cb158\",\"name\":\"Erin Stellato\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0c8b485bd54ea26b57e99f79b525f409?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0c8b485bd54ea26b57e99f79b525f409?s=96&d=mm&r=g\",\"caption\":\"Erin Stellato\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/erin\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/erin\/author\/erin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Further Testing with Automatic Updates to Statistics - Erin Stellato","description":"Changes in data distribution invalidate statistics and cause automatic updates, does adding a column to a table do the same? Read on to find out...","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\/erin\/testing-automatic-updates-statistics\/","og_locale":"en_US","og_type":"article","og_title":"Further Testing with Automatic Updates to Statistics - Erin Stellato","og_description":"Changes in data distribution invalidate statistics and cause automatic updates, does adding a column to a table do the same? Read on to find out...","og_url":"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/","og_site_name":"Erin Stellato","article_published_time":"2014-05-02T14:00:14+00:00","article_modified_time":"2014-05-03T03:21:13+00:00","og_image":[{"url":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-content\/uploads\/2014\/04\/1-1024x56.png"}],"author":"Erin Stellato","twitter_misc":{"Written by":"Erin Stellato","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/","url":"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/","name":"Further Testing with Automatic Updates to Statistics - Erin Stellato","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/erin\/#website"},"datePublished":"2014-05-02T14:00:14+00:00","dateModified":"2014-05-03T03:21:13+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/erin\/#\/schema\/person\/76170223ffffa1df03fd9be5b66cb158"},"description":"Changes in data distribution invalidate statistics and cause automatic updates, does adding a column to a table do the same? Read on to find out...","breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/erin\/testing-automatic-updates-statistics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/erin\/"},{"@type":"ListItem","position":2,"name":"Further Testing with Automatic Updates to Statistics"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/erin\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/erin\/","name":"Erin Stellato","description":"The SQL Sequel","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/erin\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/erin\/#\/schema\/person\/76170223ffffa1df03fd9be5b66cb158","name":"Erin Stellato","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/erin\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0c8b485bd54ea26b57e99f79b525f409?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0c8b485bd54ea26b57e99f79b525f409?s=96&d=mm&r=g","caption":"Erin Stellato"},"sameAs":["http:\/\/3.209.169.194\/blogs\/erin"],"url":"https:\/\/www.sqlskills.com\/blogs\/erin\/author\/erin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/posts\/647"}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/comments?post=647"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/posts\/647\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/media?parent=647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/categories?post=647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/erin\/wp-json\/wp\/v2\/tags?post=647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}