How are logical reads calculated?
I've read the definition of logical reads from:
http://msdn.microsoft.com/en-us/library/ms184361.aspx
it says:
"Number of pages read from the data cache."
I have two tables (Row count of table_1 is 141, and table_2 is 16.811), when I run those two queries, it gives the following result.
SELECT * FROM Table_1
results
Scan count 1, logical reads 6, physical reads 0, read-ahead reads 0.
SELECT * FROM Table_2
results
scan count 1, logical reads 701, physical reads 0开发者_运维知识库, read-ahead reads 0
if logic reads is "Number of pages read from the data cache." then what is a page ? How it is calculated ?
A page is a minimal physical data unit SQL Server
works with.
A page is 8K
long and may contain several table records, index records and other information.
Even if a row is 10
bytes long, the whole page needs to be read.
In your case, a page contains about 20
rows in average.
精彩评论