I'm using StackOverflow2010 10GB version from this link: https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/
Currently, I only have 1 clustered index in the Users table.
I found that when I select Id from Users table, it went single-threaded, it consumed 7405 logical pages.
SELECT Id
FROM Users;
Execution Plan: https://www.brentozar.com/pastetheplan/?id=ByMAsHjUi
However, if I added 1 WHERE
clause which filtered LastAccessDate
, it was parallel and logical reads went up to 7778 logical reads.
SELECT Id
FROM Users
WHERE LastAccessDate > '20150101';
Execution Plan: https://www.brentozar.com/pastetheplan/?id=Syg4nBjUo
What I think is, if both queries are going to SELECT
Id and using clustered index only, the logical reads should be the same, but why it is different now?