dbcc FREEPROCCACHE
dbcc DROPCLEANBUFFERS
set STATISTICS IO ON--Case 1
SELECT * from Production.Suppliers s
--(30 row(s) affected)
--Table 'Suppliers'. Scan count 1, logical reads 3, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
--again without clearing the cache I ran above
set STATISTICS IO ON
SELECT * from Production.Suppliers s
--(30 row(s) affected)
--Table 'Suppliers'. Scan count 1, logical reads 3, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
我不明白当我在案例 1 中清除缓存时它如何显示逻辑读取 3,我读取的是逻辑读取意味着否。从数据缓存中读取的页面,但我在执行 sql 语句之前在 CASE 1 中清除它仍然给我逻辑读取 3 当数据缓存被清除时
为什么?