HOW TO: ??????? ??? KEEPFIXED ??? ????? Recompilations ????? ?????

?????? ????????? ?????? ?????????
???? ???????: 276220 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

?? ??? ??????? ??? recompiled ????????? ??????? ?? ???? ??????? recompilation ??????? ???? ?? ?????? ????. ???? ?? ??? ???? ???? SQL Pack 2 (SP2) ?????? ?? ????? recompilation ????? ????? ??????? ?????? ?????? ??? ?? ???? recompiled ??? ????? ?????. ????? ?? ??????? ????? ??? recompiles ??????? ????? ????? ??????? ?????? ?????? ??????? ?????? ?????? ????????? ????? ??????? ??????.

?????? ?? SQL Server 7.0 SP3 ?? ????? ??????? ????? ??? KEEPFIXED ??? ?? ????? ???????? ?? ??????? ??? ???? ??????? recompilation ???? ?? ??????? ???????? ??? ????????.

???? ????? ????????? ???? KEEPFIXED ?????? ????????? ??? ????? ????? ??????? ????? ??????? ?? ???????? ?? ??????? ???? ????? (??? ???? ??????? ????? ?? ??? ?? ?????). ?????? ??? ??????? ?????? ??? ????? ??????? ????? recompilation ??????? ?????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
243586INF: ????? ????? Recompilation ??????? ?????

??? ????? ??????? ????????? ??? KEEPFIXED

????? ???????? ???????? ?? ??? ?????? ?? ????? "????? ????? Microsoft" ???????:
243586INF: ????? ????? Recompilation ??????? ?????
   drop procedure RowModifications 
   go
   create procedure RowModifications as
   -- assume SomeTable exists with the same definition as #t, 
   -- and has over 1000 rows
   create table  #t (a int )
   select * from  #t
   insert  #t select * from retest
   select count(*) from #t  where a = 37
   --option (keepfixed plan)
   go
   exec RowModifications
   go
   exec RowModifications
   go 
 
				
????? ?????? ?? ??????? RowModifications ???????? ???????? ??????? ????? ?? recompilation:
  select count(*) from #t where a = 37
				
??? ??? ?????? ??? ???????? ????????:
Option (keepfixed plan)
				
?? ??? ????????? ?? ???? ????????? recompilation ??? ????:
select count(*) from #t  where a = 37 option (keepfixed plan) 
				
?????? ??? ??????? ??????? ??? ?????? ??? ????? ????? ? ?? ???? ??? ???? ??????? ?????? ??????. ??? ??? ???? ?? ?? ???? ??? ?????? ??????? ??? ?????? ?????? ?? ????? ???? ??? ?? ???? ?????? ?? ???? ????? ????? ???? SQL ??? ????. ?? ????? ??? ??????? ?? SQL Server 7.0 ?????? ????? ?????? Service Pack 2 (SP2) ?? ????? ????.

???????

???? ???????: 276220 - ????? ??? ??????: 23/????? ???????/1427 - ??????: 5.4
????? ???
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2000 64-bit Edition
????? ??????: 
kbmt kbhowtomaster kbinfo KB276220 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????276220

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com