{"id":274,"date":"2018-06-13T20:59:58","date_gmt":"2018-06-13T20:59:58","guid":{"rendered":"http:\/\/dbtut.com\/?p=274"},"modified":"2021-02-08T11:43:18","modified_gmt":"2021-02-08T11:43:18","slug":"statistic-concept-and-performance-effect-on-sql-server","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/","title":{"rendered":"SQL Server Statistics and Performance Effect"},"content":{"rendered":"<p><span style=\"font-size: 1.125rem; font-family: var(--text-font);\">We will talk about SQL Server Statistics in this article.<\/span><\/p>\n<h2>What is Statistics in SQL Server?<\/h2>\n<p>When you execute a query on SQL Server, it decides how the query will work. It benefits from statistics when deciding how the query will work. The statistics shows the distribution of the data in the table or indexed views.<\/p>\n<p>We mentioned how index will effect the performance of a query in the article &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/12\/index-concept-and-performance-effect-on-sql-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Index Concept and Performance Effect on SQL Server<\/a>&#8220;.<\/p>\n<h3>Index Access Methods in SQL Server<\/h3>\n<p>SQL Server uses one or more of the following access methods to access data using statistics.<\/p>\n<ul type=\"disc\">\n<li>It goes to the index and finds records that it searched for without searching all of the index(<strong>Index Seek<\/strong>)<\/li>\n<li>It goes to the index and finds records that it searched for with scanning all of the index(<strong>Index Scan<\/strong>)<\/li>\n<li>First it goes to the index and finds a column that it searched for without searching all of the index, then it goes to the clustered index with the key value on that index and finds the other columns of the record it is looking for. (<strong>Index Seek+Key Lookup<\/strong>)<\/li>\n<li>First it goes to the index and finds a column that it searched for with scanning all of the index, then it goes to the clustered index with the key value on that index and finds the other columns of the record it is looking for. (<strong>Index Scan+Key Lookup<\/strong>)<\/li>\n<li>It goes to the clustered index and finds records that it searched for without searching all of the clustered index (<strong>Clustered Index Seek<\/strong>)<\/li>\n<li>It goes to the clustered index and finds records that it searched for with scanning all of the clustered index (<strong>Clustered Index Scan<\/strong>)<\/li>\n<\/ul>\n<p>For example, a table named Table1 would have 100 records.<\/p>\n<p>This table has an index in column A. The value of 3 record is Tom and the value of the other 97 records is Jerry.<\/p>\n<p lang=\"en-US\">When I run the below query, SQL Server check the statistics and see Tom&#8217;s ratio as 3% on the table and it will decide that index seek is the fastest solution to execute the query.<\/p>\n<pre class=\"lang:default decode:true\">SELECT from Table1 where = 'Tom'<\/pre>\n<p><span lang=\"en-US\">When I run the below query, SQL Server check the statistics againg and see Jerry&#8217;s ratio as %97 on the table and it will decide that index scan is the fastest solution to execute the query. It would be faster to scan the table from scratch instead of seeking 97 times.<\/span><\/p>\n<pre class=\"lang:default decode:true\">SELECT from Table1 where = 'Jerry'<\/pre>\n<p>If you execute the above query within a sp, a query plan will be created once when the query executed first time and the query will use the same query plan each time to avoiding query plan creation each time.<\/p>\n<p>Since the distribution of Tom and Jerry values \u200b\u200bis different, using different query plan will be more efficient. So, if the SQL Server use the same query plan for Tom and Jerry, the query will not work with the correct execution plan each time and this will cause parameter sniffing.<\/p>\n<p>I would recommend reading the articles named &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/07\/18\/spstored-procedure-on-sql-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Sp(Stored Procedure) On SQL Server<\/a>&#8221; and &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/07\/20\/what-is-paramater-sniffing\/\" target=\"_blank\" rel=\"noopener noreferrer\">What is Parameter Sniffing<\/a>&#8220;.<\/p>\n<h3>Let&#8217;s go back to the statistics<\/h3>\n<p lang=\"en-US\">When we create an index, the statistics for that index are automatically created.<\/p>\n<p lang=\"en-US\">But if the index contains more than one column, only statistics for the first column are generated.<\/p>\n<p lang=\"en-US\">When we rebuild the index, the statistics are updated.<\/p>\n<p>There are a few settings related to statistics on database basis.<\/p>\n<p>Right-click on the database and select Properties, then select the Options tab.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/286.png\" width=\"742\" height=\"244\" \/><\/p>\n<h3>Statistic Settings in SQL Server<\/h3>\n<table border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 121.6px;\">Auto Create Statistics<\/td>\n<td style=\"width: 588.8px;\">If set to true and if there is no statistics on where clause of the query, the statistics will be created automayically on that column. Default is True. I would recommend you leave it like this.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 121.6px;\">Auto Update Statistics<\/td>\n<td style=\"width: 588.8px;\">If set to true, the statistic is automatically updated when the row change on the table exceeds 20%.When the change exceeds 20%, the first query to wait for the update of the statistic. Auto value is True.<\/p>\n<p>If there is no performance bottleneck on your system, it may remain True.<\/p>\n<p>If you set as False and you do not have a job that updates statistics, your system&#8217;s performance will gradually decrease because the statistics will be out of date.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 121.6px;\">Auto Update Statistics Asynchronously<\/td>\n<td style=\"width: 588.8px;\">Used with Auto Update Statistics feature.If you set as True, you will ensure that the update statistics operation works asynchronously and queries will not wait this operation.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 121.6px;\">Auto Create Incremental Statistics<\/td>\n<td style=\"width: 588.8px;\">It is a feature that introduced with SQL Server 2014.If your database has a partition, it can be very useful, if not , it is not needed.<\/p>\n<p>When you set Auto Update Statistics as True, the statistics are updated when the row change on the table exceeds 20%.<\/p>\n<p>And if you set Auto Create Incremental Statistics as True, it will be partition based.<\/p>\n<p>You can reduce the load on the system by updating statistic partition basis.<\/p>\n<p>I have not enabled this feature even in a database with a very busy transaction size of 20 TB.<\/p>\n<p>Because if you do not update statistics With FULLSCAN (I think it is not necessary), cost of updating statistics is not big for the system and it completing quickly.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>SQL Server Update Statistics Methods<\/h3>\n<p>There are two ways to update stats.<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 108.8px;\">sp_updatestats<\/td>\n<td style=\"width: 618.4px;\">Updates all statistics in the database. \u0130t does not Update statistics With FULLSCAN.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 108.8px;\">UPDATE STATISTICS<\/td>\n<td style=\"width: 618.4px;\">You can update a specific statistic or all statistics of a table.The &#8220;Update Statistics dbo.myIdentity (ss)&#8221; command updates the ss statistics in the myIdentity table.<\/p>\n<p>The &#8220;Update Statistics dbo.myIdentity&#8221; command updates all statistics in the myIdentity table.<\/p>\n<p>The &#8220;Update Statistics dbo.myIdentity WITH FULLSCAN&#8221; command updates all statistics in the myIdentity table by scanning the entire table. If the table is big, it will take longer..<\/p>\n<p>I have never used it until today. I do not think it&#8217;s necessary.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>UPDATE STATISTICS in SQL Server<\/h3>\n<p>The most important thing you need to know about statistics is that they have to be up to date.<\/p>\n<p>In order to keep statistics up-to-date, you need to have a job that updates statistics except that settings I mentioned above.<\/p>\n<p>I usually schedule update statistics job to work once a week, but on some systems the statistics can be out of date more quickly, and you may need to schedule the job to work once an hour. You should analyze the interval and schedule the job.<\/p>\n<p><strong>So if there is a performance problem in a system, the first thing we have to do is update the statistics.<\/strong><\/p>\n<p>I will share the script below which will update all statistics on all the databases on the Instance. You should create a job that contains this script and schedule according yo your system&#8217;s need.<\/p>\n<p>If there is a database in restoring, read only or offline mode on the instance, the script will fail.<\/p>\n\n<pre class=\"lang:default decode:true\">DECLARE @SQL NVARCHAR(1000)\u00a0\r\nDECLARE @DB sysname\u00a0\r\n\r\nDECLARE curDB CURSOR FORWARD_ONLY STATIC FOR\u00a0\r\n\u00a0\u00a0 SELECT [name]\u00a0\r\n\u00a0\u00a0 FROM master..sysdatabases\r\n\u00a0\u00a0 WHERE [name] NOT IN ('model', 'tempdb','master','msdb')\r\n\u00a0\u00a0 ORDER BY [name]\u00a0\u00a0\u00a0\u00a0\r\nOPEN curDB\u00a0\r\nFETCH NEXT FROM curDB INTO @DB\u00a0\r\n\r\nWHILE @@FETCH_STATUS = 0\u00a0\r\n\u00a0\u00a0 BEGIN\u00a0\r\n\u00a0\u00a0 IF DATABASEPROPERTYEX(@DB,'Updateability') = 'READ_WRITE'\r\n\u00a0\u00a0 BEGIN\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SELECT @SQL = 'USE [' + @DB +']' + CHAR(13) + 'EXEC sp_updatestats' + CHAR(13)\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 exec sp_executesql @SQL\u00a0\r\nEND\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FETCH NEXT FROM curDB INTO @DB\u00a0\r\n\u00a0\u00a0 END\r\nCLOSE curDB\u00a0\r\nDEALLOCATE curDB\r\n<\/pre>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_274\" class=\"pvc_stats all  \" data-element-id=\"274\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We will talk about SQL Server Statistics in this article. What is Statistics in SQL Server? When you execute a query on SQL Server, it decides how the query will work. It benefits from statistics when deciding how the query will work. The statistics shows the distribution of the data in the table or indexed &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_274\" class=\"pvc_stats all  \" data-element-id=\"274\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":14386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[3],"tags":[7016,294,291,292,293,290,289,7021,7029,296,7028,7015,188,187,5411,175,5413,251,295,5417,1118,7018,7024,7022,5410,252,7019,121,7032,7017,288,5420,7020,7023,298,7012,7013,7014,7011,7010,6878,7027,7030,7031,7026,5415,7025,297],"class_list":["post-274","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-mssql","tag-about-statistics","tag-auto-create-incremental-statistics","tag-auto-create-statistics","tag-auto-update-statistics","tag-auto-update-statistics-asynchronously","tag-clustered-index-scan","tag-clustered-index-seek","tag-difference-between-sp_updatestats-and-update-statistics","tag-do-sql-indexes-update-automatically","tag-fullscan","tag-how-does-statistics-work-in-sql-server","tag-index-access-methods","tag-index-scan","tag-index-seek","tag-index-update-statistics-sql-server","tag-key-lookup","tag-mssql-statistics-update","tag-performance-tuning","tag-sp_updatestats","tag-sp_updatestats-vs-update-statistics","tag-sql-server-statistics","tag-sql-server-statistics-tutorial","tag-sql-server-table-statistics","tag-sql-server-update-all-database-statistics","tag-sql-server-update-statistics-all-tables","tag-sql-tuning","tag-statistic-settings","tag-statistics","tag-statistics-in-sql-server","tag-statistics-tutorial","tag-update-statistics","tag-update-statistics-for-all-tables","tag-update-statistics-method","tag-update-statistics-script-in-sql-server","tag-update-statistics-with-fullscan","tag-what-is-clustered-index-key","tag-what-is-clustered-index-scan","tag-what-is-clustered-index-seek","tag-what-is-index-scan","tag-what-is-index-seek","tag-what-is-key-lookup","tag-what-is-sql-server-database-statistics","tag-what-is-statistics","tag-what-is-statistics-in-sql-server","tag-what-is-the-use-of-update-statistics-in-sql-server","tag-what-is-update-statistics-fullscan","tag-what-is-update-statistics-sql-server","tag-with-fullscan"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL Server Statistics and Performance Effect - Database Tutorials<\/title>\n<meta name=\"description\" content=\"We will talk about SQL Server Statistics in this article.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server Statistics and Performance Effect - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"We will talk about SQL Server Statistics in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-13T20:59:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-08T11:43:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png\" \/>\n\t<meta property=\"og:image:width\" content=\"504\" \/>\n\t<meta property=\"og:image:height\" content=\"323\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"dbtut\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dbtut\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/\"},\"author\":{\"name\":\"dbtut\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\"},\"headline\":\"SQL Server Statistics and Performance Effect\",\"datePublished\":\"2018-06-13T20:59:58+00:00\",\"dateModified\":\"2021-02-08T11:43:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/\"},\"wordCount\":1144,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png\",\"keywords\":[\"About Statistics\",\"Auto Create Incremental Statistics\",\"Auto Create Statistics\",\"Auto Update Statistics\",\"Auto Update Statistics Asynchronously\",\"Clustered Index Scan\",\"Clustered Index Seek\",\"difference between sp_updatestats and update statistics\",\"Do SQL indexes update automatically?\",\"FULLSCAN\",\"How does statistics work in SQL Server?\",\"Index Access Methods\",\"index scan\",\"index seek\",\"index update statistics sql server\",\"key lookup\",\"mssql statistics update\",\"performance tuning\",\"sp_updatestats\",\"sp_updatestats vs Update statistics\",\"SQL Server Statistics\",\"SQL Server Statistics Tutorial\",\"sql server table statistics\",\"sql server update all database statistics\",\"sql server update statistics all tables\",\"sql tuning\",\"Statistic Settings\",\"statistics\",\"Statistics in SQL Server\",\"Statistics Tutorial\",\"Update Statistics\",\"Update Statistics for All Tables\",\"update statistics Method\",\"update statistics script in sql server\",\"Update Statistics WITH FULLSCAN\",\"What is Clustered Index Key\",\"What is Clustered Index Scan\",\"What is Clustered Index Seek\",\"What is Index Scan\",\"What is Index Seek\",\"what is key lookup\",\"What is SQL Server database statistics?\",\"What is statistics\",\"What is Statistics in SQL Server\",\"What is the use of update statistics in SQL Server?\",\"What is update statistics Fullscan?\",\"What is update statistics SQL Server?\",\"WITH FULLSCAN\"],\"articleSection\":[\"MSSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/\",\"name\":\"SQL Server Statistics and Performance Effect - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png\",\"datePublished\":\"2018-06-13T20:59:58+00:00\",\"dateModified\":\"2021-02-08T11:43:18+00:00\",\"description\":\"We will talk about SQL Server Statistics in this article.\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png\",\"width\":504,\"height\":323},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server Statistics and Performance Effect\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\",\"name\":\"dbtut\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"caption\":\"dbtut\"},\"description\":\"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.\",\"sameAs\":[\"http:\/\/NurullahCAKIR\"],\"url\":\"https:\/\/dbtut.com\/index.php\/author\/dbtut\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Server Statistics and Performance Effect - Database Tutorials","description":"We will talk about SQL Server Statistics in this article.","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:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server Statistics and Performance Effect - Database Tutorials","og_description":"We will talk about SQL Server Statistics in this article.","og_url":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/","og_site_name":"Database Tutorials","article_published_time":"2018-06-13T20:59:58+00:00","article_modified_time":"2021-02-08T11:43:18+00:00","og_image":[{"width":504,"height":323,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png","type":"image\/png"}],"author":"dbtut","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dbtut","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/"},"author":{"name":"dbtut","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408"},"headline":"SQL Server Statistics and Performance Effect","datePublished":"2018-06-13T20:59:58+00:00","dateModified":"2021-02-08T11:43:18+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/"},"wordCount":1144,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png","keywords":["About Statistics","Auto Create Incremental Statistics","Auto Create Statistics","Auto Update Statistics","Auto Update Statistics Asynchronously","Clustered Index Scan","Clustered Index Seek","difference between sp_updatestats and update statistics","Do SQL indexes update automatically?","FULLSCAN","How does statistics work in SQL Server?","Index Access Methods","index scan","index seek","index update statistics sql server","key lookup","mssql statistics update","performance tuning","sp_updatestats","sp_updatestats vs Update statistics","SQL Server Statistics","SQL Server Statistics Tutorial","sql server table statistics","sql server update all database statistics","sql server update statistics all tables","sql tuning","Statistic Settings","statistics","Statistics in SQL Server","Statistics Tutorial","Update Statistics","Update Statistics for All Tables","update statistics Method","update statistics script in sql server","Update Statistics WITH FULLSCAN","What is Clustered Index Key","What is Clustered Index Scan","What is Clustered Index Seek","What is Index Scan","What is Index Seek","what is key lookup","What is SQL Server database statistics?","What is statistics","What is Statistics in SQL Server","What is the use of update statistics in SQL Server?","What is update statistics Fullscan?","What is update statistics SQL Server?","WITH FULLSCAN"],"articleSection":["MSSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/","url":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/","name":"SQL Server Statistics and Performance Effect - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png","datePublished":"2018-06-13T20:59:58+00:00","dateModified":"2021-02-08T11:43:18+00:00","description":"We will talk about SQL Server Statistics in this article.","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-27.png","width":504,"height":323},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"SQL Server Statistics and Performance Effect"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408","name":"dbtut","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","caption":"dbtut"},"description":"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.","sameAs":["http:\/\/NurullahCAKIR"],"url":"https:\/\/dbtut.com\/index.php\/author\/dbtut\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=274"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/274\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/14386"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}