You already asked this. See the old thread: https://learn.microsoft.com/en-us/answers/questions/79672/trancate-table-and-lob-data.html
MSSQL: allocation unit for LOB_DATA
the table has a nvarchar(max) columns , I insert 1 row in the table . and then truncate the table. and found that there are still allocation unit for LOB_DATA, and other IN_ROW_DATA are already deallocated. why is that ?
CREATE TABLE TableMetaData (
Col1 INT,
Col2 INT,
Col3 DATETIME,
Col4 VARCHAR(3000), --Row OverFlow
col5 VARCHAR(3000),
Col6 NVARCHAR(MAX), -- blob
Col7 VARCHAR(5000)
) ON MyTestPartScheme (Col1);
SELECT *
FROM sys.allocation_units
WHERE container_id IN ( SELECT partition_id
FROM sys.partitions
WHERE object_id = OBJECT_ID('TableMetaData '))
AND
type_desc = 'LOB_DATA'
ORDER BY container_id;