_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › ForceSeek
Force Seek 螳襦 碁煙るゼ 郁鍵(?) 貎朱Μ 碁. 襯 覲企 所 . ろ碁ゼ 譴觜襯 .
use tempdb
go

set nocount on 
set statistics io off

--drop table force_seek_table
create table force_seek_table
(
	col1 int identity not null,
	col2 tinyint not null
);
go

begin tran;
declare @i int;
set @i = 1;
while (@i <= 1000000)
begin
	if (@i <=100000)
		insert into force_seek_table (col2) values (10);
	if (@i > 100000 and @i <= 1000000)
		insert into force_seek_table (col2) values (90);
	set @i = @i + 1;
end
commit;
go

create nonclustered index force_seek_table on force_seek_table (col2);
go

れ 貎朱Μ襯 ろ 覲伎.
select * from force_seek_table
where col2 = 10;
force_seek01.jpg

SQL Server 牛磯伎 れ . Force Seek 碁ゼ 譯朱 企至 蟾? 轟壱 Index Seek .

select * from force_seek_table with (forceseek)
where col2 = 10;
force_seek02.jpg
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

螻手碓襯 蟆 れる慨讌 襷. 蠏瑚 れ れ . 襯 蠍磯´蟆 伎. 蠏瑚 蠏碁 蟆企. 谿 蠍一朱 れ襷螻 螳 覓伎螳襯 襷朱.