????????洢???????????
???????????? ???????[ 2015/7/6 13:44:06 ] ????????????? ???????
???????
????SQL Server??????и??е???????????и??????????????Ч??????в???????????????Ч??????????????????????ι漲?????
??????SQL Server?У??????洢??????λ?????????????????8K????????64K???????ζ??1M???????????16?????? SQL Server?е??????????????????洢?????????In_Row_Data???洢Lob?????LOB_Data???洢????????Row_Overflow_data????????????????????????????????????????????
????????????2???????
?2.?????
?????2???????????????????????????????е?????????????????????8060??????ò??????????????(Row_Overflow_Data)????????洢LOB???.???????????????DBCC IND???????????????3?????
?????3.????8060??????????????
???????IAM?????1???????????????????洢????????LOB?????????????洢???????????????????????????????????г??????????е??л?洢???24????????????????????????????LOB??У????Text???VarBinary(max)??????LOB??е???????????У???SQL Server 2000?У???г???8060????????????????SQL Server 2005????汾?????????????????????Varchar??nvarchar????????????????е??С??????8060?????????????????In-row data????varchar?д洢???????????????г???8060???????????????????Row-overflow data??У????update????????д?С?????С??8060???????????????????in-row data???
????????????????
????????????Щ????????????????SQL Server???????????????λ????????????????ζ??????IO?????и????????CPU????????????????????????????:
?????????????е??С??С
?????????????????????????????????SQL Server???????????и???????
????????洢INT????????????????????????INT????BIGINT??????SMALLINT????INT??????TINYINT????SMALLINT??
??????????????е??????С???????????С???????????
????1.???粻????DateTime???????????????????????????????±?:
????????
??????????
????Date(??????)
????3
????Time(?????)
????5
????DateTime2(????????)
????8
????DateTimeOffSet(????????
????10
????2.???VarChar(Max)??Nvarchar(Max)??varbinary(Max)??????text??ntext??image????
??????????????????????????????text??ntext??image??????????????????null???????ú?С?????????????????????LOB???????????????????????????Varchar(Max)?????????????????????????С?????????In-row-data?????????????????????LOB?????е????????????????????LOB??????????Varchar(Max)?????????????????????????磺
????COL_LENGTH
????CHARINDEX
????PATINDEX
????LEN
????DATALENGTH
????SUBSTRING
????3.????????洢??????У?????????????????Varchar???
???????????????????С??洢???????洢123456789???INT????????4???????????Varchar???9?????(????????Varchar????????4???????????)??
????4.?????б??????????Nvarchar??Nchar????“??”???λ?洢??????????????????????????varchar????char????????洢???
????5.????Char??VarChar?????
????????????????Щ?????????ü????????????????Varchar???????????????????Varchar??????洢???????洢?????????????Char??????洢??????????????????????Char?????????洢???????????????????????????????д洢?????????????????????????????????Char??????????Varchar????á????????Varchar???Char?????ü??????洢?????????????????????????顣
?????????????????????????????????У????INT??????У??????????????Char(5)???????в???????????????????????DBCC PAGE???????????????4?????
?4.???char(5)????????????????16???
??????
???·???
??????????????????
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