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":815,"date":"2013-01-08T13:12:03","date_gmt":"2013-01-08T21:12:03","guid":{"rendered":"http:\/\/3.209.169.194\/blogs\/joe\/?p=815"},"modified":"2013-02-07T05:16:04","modified_gmt":"2013-02-07T13:16:04","slug":"exploring-row-and-page-count-impact-on-estimated-cpu-and-io-cost","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/joe\/exploring-row-and-page-count-impact-on-estimated-cpu-and-io-cost\/","title":{"rendered":"Row and Page Count Influence on Estimated CPU and I\/O Cost"},"content":{"rendered":"

In this post I’ll step through a few scenarios regarding row and page counts – and their associated influence on estimated CPU and I\/O cost. \u00a0I’ll be using the Credit<\/a> database to demonstrate different scenarios…<\/p>\n

Starting State<\/strong><\/p>\n

I’ll start off by checking the total number of reported data pages and row counts for the member table:<\/p>\n

 \r\nSELECT [in_row_data_page_count]\r\nFROM [sys].[dm_db_partition_stats]\r\nWHERE [object_id] = OBJECT_ID('dbo.member') AND\r\n[index_id] = 1;\r\n\r\nSELECT COUNT(*) AS [row_count]\r\nFROM [dbo].[member];\r\n\r\n<\/pre>\n

The member table has 142 data pages and 10,000 rows.<\/p>\n

Next I’ll execute a simple query and check the estimated I\/O and estimated CPU of the Clustered Index Scan operator:<\/p>\n

 \r\nSELECT [member].[member_no],\r\n[member].[lastname]\r\nFROM [dbo].[member]\r\nOPTION (RECOMPILE);\r\n<\/pre>\n

The Clustered Index Scan operator shows the following estimated costs:<\/p>\n