Table of Contents

Class ObjectSchema.ColumnStoreRowGroup

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

sys.column_store_row_groups (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Provides clustered columnstore index information on a per-segment basis to help the administrator make system management decisions. sys.column_store_row_groups has a column for the total number of rows physically stored (including those marked as deleted) and a column for the number of rows marked as deleted. Use sys.column_store_row_groups to determine which row groups have a high percentage of deleted rows and should be rebuilt.


See sys.column_store_row_groups.

[Table(Schema = "sys", Name = "column_store_row_groups", IsView = true)]
public class ObjectSchema.ColumnStoreRowGroup
Inheritance
ObjectSchema.ColumnStoreRowGroup
Extension Methods

Properties

DeletedRows

Total rows in the row group marked deleted. This is always 0 for DELTA row groups.

[Column("deleted_rows")]
[Nullable]
public long? DeletedRows { get; set; }

Property Value

long?

DeltaStoreHoBTID

The hobt_id for OPEN row group in the delta store.

NULL if the row group is not in the delta store.

NULL for the tail of an in-memory table.

[Column("delta_store_hobt_id")]
[Nullable]
public long? DeltaStoreHoBTID { get; set; }

Property Value

long?

IndexID

ID of the index for the table that has this columnstore index.

[Column("index_id")]
[Nullable]
public int? IndexID { get; set; }

Property Value

int?

Object

objects (sys.objects)

[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = false)]
public ObjectSchema.Object Object { get; set; }

Property Value

ObjectSchema.Object

ObjectID

The id of the table on which this index is defined.

[Column("object_id")]
[Nullable]
public int? ObjectID { get; set; }

Property Value

int?

PartitionNumber

ID of the table partition that holds row group row_group_id. You can use partition_number to join this DMV to sys.partitions.

[Column("partition_number")]
[Nullable]
public int? PartitionNumber { get; set; }

Property Value

int?

RowGroupID

The row group number associated with this row group. This is unique within the partition.

-1 = tail of an in-memory table.

[Column("row_group_id")]
[Nullable]
public int? RowGroupID { get; set; }

Property Value

int?

SizeInBytes

Size in bytes of all the data in this row group (not including metadata or shared dictionaries), for both DELTA and COLUMNSTORE rowgroups.

[Column("size_in_bytes")]
[Nullable]
public long? SizeInBytes { get; set; }

Property Value

long?

State

ID number associated with the state_description.

0 = INVISIBLE

1 = OPEN

2 = CLOSED

3 = COMPRESSED

4 = TOMBSTONE

[Column("state")]
[Nullable]
public byte? State { get; set; }

Property Value

byte?

StateDescription

Description of the persistent state of the row group:

INVISIBLE -A hidden compressed segment in the process of being built from data in a delta store. Read actions will use the delta store until the invisible compressed segment is completed. Then the new segment is made visible, and the source delta store is removed.

OPEN - A read/write row group that is accepting new records. An open row group is still in rowstore format and has not been compressed to columnstore format.

CLOSED - A row group that has been filled, but not yet compressed by the tuple mover process.

COMPRESSED - A row group that has filled and compressed.

[Column("state_description")]
[NotNull]
public string StateDescription { get; set; }

Property Value

string

TotalRows

Total rows physically stored in the row group. Some may have been deleted but they are still stored. The maximum number of rows in a row group is 1,048,576 (hexadecimal FFFFF).

[Column("total_rows")]
[Nullable]
public long? TotalRows { get; set; }

Property Value

long?