I have a similar question to this (Does the number of columns affect query performance?). However, I wanted to get a more detailed explanation. I had a suspicion and confirmed that having less columns would improve the performance.
So, I ran the following test
Setup
Both tables had 19 Million Rows and a NC Index on c1
- Table A - 46 Columns
- Table B - 15 Columns
Query
SELECT TOP 2 Million
c1,
c2
FROM Table
- Results
When I ran this same query against both Tables, Table B was significantly faster. Logical Reads decreased by 53%. No physical reads on either.
Question
My best guess (based on my research) is less columns leads to more rows being stored per page. Which would lead to less pages to read from cache.
Is this correct, or is there something else that I am missing?