??????SQL Server???????
???????????? ???????[ 2015/7/31 11:05:12 ] ?????????????
??
????11????????? DBCC REINDEX ??DBCC INDEXDEFRAG?????????????? DBCC SHRINKDB??DBCC SHRINKFILE. ??????????????.??????????????????????????????????????????????????T-sql??д?????к?????????????г???????????????DBMS???????????????????????????
????1?? ???????????????顡??
????2?? ?????????DBMS?????????????
????3?? ??????????????????·???????????
????4?? ?????????????????滮????
????5?? ????????????????????????С???
????6?? ????н????????????Σ??????SQL SERVER????????????????????С?8K(8060)????8???????????????????B??????????
????12??Commit??rollback?????? Rollback:??????е????? Commit:???????????. ??б??????SQL??д????????д??д???????磺 begin tran exec(@s) commit trans ????????SQL д?????????洢?????????
????13??????Select???????Where????????????????????????裬??????????????????????????????I/O????????????????????????????????????????????佫?????????????????????????????????????
????14??SQL??????????????????κ????
????15???????????ù???????????????????????row-by-row????У????????÷????????磺???????????????????Table????????????????Case???????α???????????????????????з??? ??? ??????????е?????е????????С?FETCH NEXT ???????????????????????????????????????α????κε?????????????С??α???????SQL2000?±?ù???????????????????????????????????? READ_ONLY????????????α?λ????(Update)?????????????????????????? OPTIMISTIC WITH valueS:??????????????????????????????????????????????????????????Σ???????α??????е????У???к?С?????????????????????С???????α???????????????????????е??У???????????????????????????????????У?????е?????????????????????????????б???????κ????????????????????????????????????У???????????????????????????????????????
??????????????????OPTIMISTIC WITH ROW VERSIONING:???????????????????а汾?????????а汾????????е???????????汾??????????????????????????????????α???????????????? SQL Server ?У?????????? timestamp ???????????????????????????????????????и???????????????????????????????????@@DBTS????????κη????????? timestamp ?е??????SQL Server ???????????д洢????? @@DBTS ?????????? @@DBTS ????????? ??????? timestamp ?У?????????????м?????????????????е????????????????????洢?????????????????????????????????????????????е????????? timestamp ?м??ɡ??????ó??????? timestamp ?е?????????а汾????????????????α????????????????????????? SCROLL LOCKS ?????????????????????????????????У???????????ж????α??????????ó????????????????С?????÷??????α???????ж????α?????????????????????????????????????α?????????????????????????????????????????????????????α??????????????????α????????????????????????????????????????????????????????α?????????????????????????κ??????????????????????????????????????????????С???????????????????????????????????????????????????У?????????????????????????????????????????????α???? Select ???????????????????Щ?α???????????????????????????????????????????????????′?????????α??????????????????′????????????????????е??л????????????????????????е????????????????????????????????????????????????????????????????α??????????? COMMIT ?????????κδ????α?????????????????????????????????????????????????????????????????α????????α? Select ????е????????????? ??? ?????? ????а汾???? ????????? δ???? δ???? δ???? ???? NOLOCK δ???? δ????δ???? δ???? HOLDLOCK ???? ???? ???? ???? UPDLOCK ???? ???? ???? ???? TABLOCKX ???? δ???? δ???????????? δ???? δ???? δ???? ???? *??? NOLOCK ?????????????????????α???????????????
????16????Profiler???????????????????????????SQL??????????;??????????????????????
????17?????UNion??UNion all ??????UNION all?á???
????18????????DISTINCT??????б????????????UNION?????????????????????????????????????????
????19????????????????????С??С???
????20????sp_configure 'query governor cost limit'????SET QUERY_GOVERNOR_COST_LIMIT??????????????????????????????????????????????????????????????????????????? SET LOCKTIME???????????
????11????????? DBCC REINDEX ??DBCC INDEXDEFRAG?????????????? DBCC SHRINKDB??DBCC SHRINKFILE. ??????????????.??????????????????????????????????????????????????T-sql??д?????к?????????????г???????????????DBMS???????????????????????????
????1?? ???????????????顡??
????2?? ?????????DBMS?????????????
????3?? ??????????????????·???????????
????4?? ?????????????????滮????
????5?? ????????????????????????С???
????6?? ????н????????????Σ??????SQL SERVER????????????????????С?8K(8060)????8???????????????????B??????????
????12??Commit??rollback?????? Rollback:??????е????? Commit:???????????. ??б??????SQL??д????????д??д???????磺 begin tran exec(@s) commit trans ????????SQL д?????????洢?????????
????13??????Select???????Where????????????????????????裬??????????????????????????????I/O????????????????????????????????????????????佫?????????????????????????????????????
????14??SQL??????????????????κ????
????15???????????ù???????????????????????row-by-row????У????????÷????????磺???????????????????Table????????????????Case???????α???????????????????????з??? ??? ??????????е?????е????????С?FETCH NEXT ???????????????????????????????????????α????κε?????????????С??α???????SQL2000?±?ù???????????????????????????????????? READ_ONLY????????????α?λ????(Update)?????????????????????????? OPTIMISTIC WITH valueS:??????????????????????????????????????????????????????????Σ???????α??????е????У???к?С?????????????????????С???????α???????????????????????е??У???????????????????????????????????У?????е?????????????????????????????б???????κ????????????????????????????????????У???????????????????????????????????????
??????????????????OPTIMISTIC WITH ROW VERSIONING:???????????????????а汾?????????а汾????????е???????????汾??????????????????????????????????α???????????????? SQL Server ?У?????????? timestamp ???????????????????????????????????????и???????????????????????????????????@@DBTS????????κη????????? timestamp ?е??????SQL Server ???????????д洢????? @@DBTS ?????????? @@DBTS ????????? ??????? timestamp ?У?????????????м?????????????????е????????????????????洢?????????????????????????????????????????????е????????? timestamp ?м??ɡ??????ó??????? timestamp ?е?????????а汾????????????????α????????????????????????? SCROLL LOCKS ?????????????????????????????????У???????????ж????α??????????ó????????????????С?????÷??????α???????ж????α?????????????????????????????????????α?????????????????????????????????????????????????????α??????????????????α????????????????????????????????????????????????????????α?????????????????????????κ??????????????????????????????????????????????С???????????????????????????????????????????????????У?????????????????????????????????????????????α???? Select ???????????????????Щ?α???????????????????????????????????????????????????′?????????α??????????????????′????????????????????е??л????????????????????????е????????????????????????????????????????????????????????????????α??????????? COMMIT ?????????κδ????α?????????????????????????????????????????????????????????????????α????????α? Select ????е????????????? ??? ?????? ????а汾???? ????????? δ???? δ???? δ???? ???? NOLOCK δ???? δ????δ???? δ???? HOLDLOCK ???? ???? ???? ???? UPDLOCK ???? ???? ???? ???? TABLOCKX ???? δ???? δ???????????? δ???? δ???? δ???? ???? *??? NOLOCK ?????????????????????α???????????????
????16????Profiler???????????????????????????SQL??????????;??????????????????????
????17?????UNion??UNion all ??????UNION all?á???
????18????????DISTINCT??????б????????????UNION?????????????????????????????????????????
????19????????????????????С??С???
????20????sp_configure 'query governor cost limit'????SET QUERY_GOVERNOR_COST_LIMIT??????????????????????????????????????????????????????????????????????????? SET LOCKTIME???????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????sql server 2000??????????????SQL Server???????????????????λ?????SQL Server??????????????????????????????SQL Server??Azure SQL??SQL SERVER ?????????????汾??????SQL Server??WITH (NOLOCK)SQL Server??????????????DML??????????SQL Server????????????????????SQL Server??????SQL Server???????????Ч?????????SQL Server?????????????????SQL Server?????????????????SQL Server????????SQL SERVER????????SQL Server????δ???????SQL SERVER??????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????