Count rows in a heap and SQL Server scans every page. See the plan change with a clustered and a narrow index, and why a heap does not compact its pages.
Index Used for COUNT(*): SQL Server Scans the Narrowest One
The index used for COUNT(*) is the narrowest one that holds every row. See the pages, the scans and the reads that prove it in SQL Server.
Index Scans – Good or Bad? – SQL in Sixty Seconds #174
Index Scans – Good or Bad? Lots of people ask about this question and I have built a blog post on the topic – SQL SERVER – Index Scans are Not Always Bad.
SQL SERVER – Index Scans are Not Always Bad
Are Index Scans Bad? The answer No. Index Scans are Not Always Bad. This was in-depth discussed with my client during the Health Check.
Rowstore to Columnstore: Replace the Clustered Index
Rowstore to columnstore is a change of the clustered index, and one command works in only one case. This post builds two tables of 600,000 rows, shows the error from DROP_EXISTING on a primary key, and converts each table the working way. It compares the sizes before and after.
JDBC and sendStringParametersAsUnicode: The Hidden Index Scan
Diagnose sendStringParametersAsUnicode conversions, align JDBC parameters with varchar indexes, and preserve required Unicode data.
Top 1 and Index Scan: A Scan That Stops After One Row
Top 1 and index scan can sit in the same plan, and the scan still reads only a few pages. This post runs six queries on a table of 100,000 rows and reads their logical reads. It shows why TOP 1 reads three pages in one case and every page in another.







