CREATE TABLE dbo.overhead ( myID INT NOT NULL ) ;
CREATE CLUSTERED INDEX CIX_overhead -- not unique!
ON dbo.overhead(myID) ;
INSERT INTO dbo.overhead
( myID )
SELECT 1 ;
SELECT min_record_size_in_bytes ,
max_record_size_in_bytes
FROM sys.dm_db_index_physical_stats(DB_ID(), OBJECT_ID(N'dbo.overhead'),
NULL, NULL, N'SAMPLED') ;
min_record_size_in_bytes max_record_size_in_bytes
------------------------ ------------------------
25 25
当插入INT记录1行时应该给4个字节,为什么25?
答案 0 :(得分:3)
这总共是25个字节。页面底部的插槽指针还有2个额外的字节,但DMV中没有考虑这些字节。
来源:http://www.sqlskills.com/blogs/paul/inside-the-storage-engine-anatomy-of-a-record/