The short answer: in the real world, only the first column works. When SQL Server needs data about the second column, it builds its own stats on that column instead (assuming they don’t already exist), and uses those two statistics together – but they’re not really correlated.
For the longer answer, let’s take a large version of the Stack Overflow database, create a two-column index on the Users table, and then view the resulting statistics:
DropIndexes; GO CREATE INDEX Location_Reputation ON dbo.Users(Location, Reputation); GO DBCC SHOW_STATISTICS(‘dbo.Users’, ‘Location_Reputation’); GO
The output of DBCC SHOW_STATISTICS shows that we’ve got about 22 million

