[英]How are logical reads calculated?
I've read the definition of logical reads from: 我已经阅读了逻辑读取的定义:
http://msdn.microsoft.com/en-us/library/ms184361.aspx 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. 我有两个表(table_1的行数是141 ,table_2是16.811 ),当我运行这两个查询时,它给出了以下结果。
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. 页面是
SQL Server
使用的最小物理数据单元。
A page is 8K
long and may contain several table records, index records and other information. 页面长度为
8K
,可能包含多个表记录,索引记录和其他信息。
Even if a row is 10
bytes long, the whole page needs to be read. 即使一行长度为
10
个字节,也需要读取整个页面。
In your case, a page contains about 20
rows in average. 在您的情况下,页面平均包含大约
20
行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.