Skip to content

Commit ed1ba63

Browse files
Clarify deleted rows stats (#34726)
1 parent 65a41bb commit ed1ba63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/relational-databases/system-dynamic-management-views/sys-dm-db-column-store-row-group-physical-stats-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "sys.dm_db_column_store_row_group_physical_stats (Transact-SQL)"
33
description: sys.dm_db_column_store_row_group_physical_stats (Transact-SQL)
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "02/27/2023"
6+
ms.date: 07/17/2025
77
ms.service: sql
88
ms.subservice: system-objects
99
ms.topic: "reference"
@@ -38,7 +38,7 @@ This extends the catalog view [sys.column_store_row_groups (Transact-SQL&#41
3838
|**state**|**tinyint**|ID number associated *state_description*.<br /><br /> 0 = INVISIBLE<br /><br /> 1 = OPEN<br /><br /> 2 = CLOSED<br /><br /> 3 = COMPRESSED<br /><br /> 4 = TOMBSTONE<br /><br /> COMPRESSED is the only state that applies to in-memory tables.|
3939
|**state_desc**|**nvarchar(60)**|Description of the row group state:<br /><br /> 0 - INVISIBLE -A row group that is being built. For example: <br />A row group in the columnstore is INVISIBLE while the data is being compressed. When the compression is finished a metadata switch changes the state of the columnstore row group from INVISIBLE to COMPRESSED, and the state of the deltastore row group from CLOSED to TOMBSTONE.<br /><br /> 1 - OPEN - A deltastore row group that is accepting new rows. An open row group is still in rowstore format and has not been compressed to columnstore format.<br /><br /> 2 - CLOSED - A row group in the delta store that contains the maximum number of rows, and is waiting for the tuple mover process to compress it into the columnstore.<br /><br /> 3 - COMPRESSED - A row group that is compressed with columnstore compression and stored in the columnstore.<br /><br /> 4 - TOMBSTONE - A row group that was formerly in the deltastore and is no longer used.|
4040
|**total_rows**|**bigint**|Number of rows physically stored in the row group. For compressed row groups. Includes the rows that are marked deleted.|
41-
|**deleted_rows**|**bigint**|Number of rows physically stored in a compressed row group that are marked for deletion.<br /><br /> 0 for row groups that are in the delta store.|
41+
|**deleted_rows**|**bigint**|Number of rows physically stored in a compressed row group that are marked for deletion.<br /><br />0 for row groups that are in the delta store.<br /><br />For nonclustered columnstore indexes, this value doesn't include deleted rows stored in the delete buffer. For more information, and to find the number of deleted rows in the delete buffer, see [sys.internal_partitions](../system-catalog-views/sys-internal-partitions-transact-sql.md).|
4242
|**size_in_bytes**|**bigint**|Combined size, in bytes, of all the pages in this row group. This size does not include the size required to store metadata or shared dictionaries.|
4343
|**trim_reason**|**tinyint**|Reason that triggered the COMPRESSED row group to have less than the maximum number of rows.<br /><br /> 0 - UNKNOWN_UPGRADED_FROM_PREVIOUS_VERSION<br /><br /> 1 - NO_TRIM<br /><br /> 2 - BULKLOAD<br /><br /> 3 - REORG<br /><br /> 4 - DICTIONARY_SIZE<br /><br /> 5 - MEMORY_LIMITATION<br /><br /> 6 - RESIDUAL_ROW_GROUP<br /><br /> 7 - STATS_MISMATCH<br /><br /> 8 - SPILLOVER<br /><br /> 9 - AUTO_MERGE|
4444
|**trim_reason_desc**|**nvarchar(60)**|Description of *trim_reason*.<br /><br /> 0 - UNKNOWN_UPGRADED_FROM_PREVIOUS_VERSION: Occurred when upgrading from the previous version of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].<br /><br /> 1 - NO_TRIM: The row group was not trimmed. The row group was compressed with the maximum of 1,048,576 rows. The number of rows could be less if a subset of rows was deleted after delta rowgroup was closed<br /><br /> 2 - BULKLOAD: The bulk-load batch size limited the number of rows.<br /><br /> 3 - REORG: Forced compression as part of REORG command.<br /><br /> 4 - DICTIONARY_SIZE: Dictionary size grew too large to compress all of the rows together.<br /><br /> 5 - MEMORY_LIMITATION: Not enough available memory to compress all the rows together.<br /><br /> 6 - RESIDUAL_ROW_GROUP: Closed as part of last row group with rows < 1 million during index build operation. Note: A partition build with multiple cores can result in more than one trim of this type.<br /><br /> 7 - STATS_MISMATCH: Only for columnstore on in-memory table. If stats incorrectly indicated >= 1 million qualified rows in the tail but we found fewer, the compressed rowgroup will have < 1 million rows<br /><br /> 8 - SPILLOVER: Only for columnstore on in-memory table. If tail has > 1 million qualified rows, the last batch remaining rows are compressed if the count is between 100k and 1 million<br /><br /> 9 - AUTO_MERGE: A Tuple Mover merge operation running in the background consolidated one or more rowgroups into this rowgroup.|

0 commit comments

Comments
 (0)