逻辑读是如何计算的?
我已经阅读了逻辑读取的定义:
http://msdn.microsoft .com/en-us/library/ms184361.aspx
它说:
“从数据缓存读取的页数。”
我有两个表(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
如果逻辑读取是“从数据缓存读取的页数”。那么什么是页面呢?它是如何计算的?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
页是
SQL Server
使用的最小物理数据单元。一个页
8K
长,可能包含多个表记录、索引记录和其他信息。即使一行有
10
字节长,也需要读取整个页面。在您的例子中,一个页面平均包含大约
20
行。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.