views:

131

answers:

1

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 ?

+1  A: 

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.

Quassnoi
So the average of 20 rows depends on the size of rows, am I correct ? Like a very big row can fill a page ?
stckvrflw
`@stckvrflw`: yes. If you have variable length datatypes in your table (like `VARCHAR` or `VARBINARY`), the record size will also be variable. Also, the records can be deleted, and their space is not immediately reused.
Quassnoi