--clustered index update test
drop table test
create table test(seq int identity primary key, id varchar(8000))
go
set statistics io off
set nocount on
insert test(id) values(replicate('a',3000))
go 10000
set statistics io on
set nocount on
select * from test
--企 'test'. 蟆 1, 朱Μ 所鍵 5020, 覓朱Μ 所鍵 0, 覩碁Μ 所鍵 0, LOB 朱Μ 所鍵 0, LOB 覓朱Μ 所鍵 0, LOB 覩碁Μ 所鍵 0.
select * from test
where seq = 100
--企 'test'. 蟆 0, 朱Μ 所鍵 3, 覓朱Μ 所鍵 0, 覩碁Μ 所鍵 0, LOB 朱Μ 所鍵 0, LOB 覓朱Μ 所鍵 0, LOB 覩碁Μ 所鍵 0.
update test
set id = replicate('a',6000)
where seq = 100
select * from test
--企 'test'. 蟆 1, 朱Μ 所鍵 5021, 覓朱Μ 所鍵 0, 覩碁Μ 所鍵 0, LOB 朱Μ 所鍵 0, LOB 覓朱Μ 所鍵 0, LOB 覩碁Μ 所鍵 0.
select * from test
where seq = 100
--企 'test'. 蟆 0, 朱Μ 所鍵 3, 覓朱Μ 所鍵 0, 覩碁Μ 所鍵 0, LOB 朱Μ 所鍵 0, LOB 覓朱Μ 所鍵 0, LOB 覩碁Μ 所鍵 0.
--varchar(500)朱 螻 fill_factor 譟一 企慨..
drop table test2
create table test2(
seq int identity
, id varchar(500)
, constraint pk_test2 primary key clustered(seq) with(fillfactor=90)
)
go
alter table test2
drop constraint pk_test2
alter table test2
add constraint pk_test2 primary key clustered(seq)
with(fillfactor = 90)