Warning: Constant WP_TEMP_DIR already defined in /var/www/html/blogs/joe/wp-config.php on line 93
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/rest-api/class-wp-rest-server.php on line 1902
{"id":495,"date":"2012-05-10T04:43:37","date_gmt":"2012-05-10T04:43:37","guid":{"rendered":"\/blogs\/joe\/post\/Selectivity-Guesses-in-absence-of-Statistics.aspx"},"modified":"2013-12-29T19:18:30","modified_gmt":"2013-12-30T03:18:30","slug":"selectivity-guesses-in-absence-of-statistics","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/joe\/selectivity-guesses-in-absence-of-statistics\/","title":{"rendered":"Selectivity Guesses in absence of Statistics"},"content":{"rendered":"Let\u2019s say you have a heap table with 1,000,000 rows in it.\u00a0 Let\u2019s also say that your automatic creation of statistics are disabled, as well as updates to the statistics (and in this scenario, there are NO existing indexes or statistics).<\/p>\n
What kind of selectivity guess would the optimizer make for a query like the following? (I copied over the FactInternetSales table with no indexes and put 1,000,000 rows in it \u2013 tested on SQL Server 2012, 11.0.2316)<\/p>\n
\n
SELECT<\/span> SalesOrderNumber\r\nFROM<\/span> dbo.FactInternetSales<\/pre>\nWHERE<\/span> ProductKey = 537;<\/pre>\n<\/div>\n