1
的在下面的代碼:差異的邏輯編號讀取組類似的數據
create table t(i int,j char(3000))
create table t1(i int,j char(3000))
create unique clustered index ixt on t(i) with (FILLFACTOR=20)
declare @n int = 0
while @n < 1000
begin
insert into t values(@n*2,'a')
insert into t1 values(@n*2,'a')
set @n = @n+1
end
create unique clustered index ixt1 on t1(i) with (FILLFACTOR=20)
上述兩個表的有相同的結構,數據類型和甚至相同的數據,但查詢他們給我不同邏輯讀取..
select * from t where i between 100 and 150 --returns 16 logical reads
select * from t1 where i between 100 and 150 --returns 30 logical reads
誰能告訴我爲什麼在table t1
返回查詢比table t
查詢更多的邏輯讀取?