MSSQL: allocation unit for LOB_DATA

sakuraime 2,326 Reputation points
2020-11-03T09:08:04.04+00:00

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;

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,665 questions
0 comments No comments
{count} votes

Accepted answer
  1. tibor_karaszi@hotmail.com 4,311 Reputation points
    2020-11-03T12:01:07.187+00:00

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.