Class ObjectSchema.InternalPartition
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
sys.internal_partitions (Transact-SQL)
Applies to: √ SQL Server 2016 (13.x) and later √ Azure SQL Database √ Azure SQL Managed Instance
Returns one row for each rowset that tracks internal data for columnstore indexes on disk-based tables. These rowsets are internal to columnstore indexes and track deleted rows, rowgroup mappings, and delta store rowgroups. They track data for each for each table partition; every table has at least one partition. SQL Server re-creates the rowsets each time it rebuilds the columnstore index.
[Table(Schema = "sys", Name = "internal_partitions", IsView = true)]
public class ObjectSchema.InternalPartition
- Inheritance
-
ObjectSchema.InternalPartition
- Extension Methods
Properties
DataCompression
The state of compression for the rowset:
0 = NONE
1 = ROW
2 = PAGE
[Column("data_compression")]
[Nullable]
public byte? DataCompression { get; set; }
Property Value
- byte?
DataCompressionDesc
The state of compression for each partition. Possible values for rowstore tables are NONE, ROW, and PAGE. Possible values for columnstore tables are COLUMNSTORE and COLUMNSTORE_ARCHIVE.
[Column("data_compression_desc")]
[Nullable]
public string? DataCompressionDesc { get; set; }
Property Value
HoBTID
ID of the internal rowset object (HoBT). This is a good key for joining with other DMVs to get more information about the physical characteristics of the internal rowset.
[Column("hobt_id")]
[NotNull]
public long HoBTID { get; set; }
Property Value
IndexID
Index ID for the columnstore index defined on the table.
1 = clustered columnstore index
2 = nonclustered columnstore index
[Column("index_id")]
[NotNull]
public int IndexID { get; set; }
Property Value
InternalObjectType
Rowset objects that track internal data for the columnstore index.
2 = COLUMN_STORE_DELETE_BITMAP
3 = COLUMN_STORE_DELTA_STORE
4 = COLUMN_STORE_DELETE_BUFFER
5 = COLUMN_STORE_MAPPING_INDEX
[Column("internal_object_type")]
[Nullable]
public byte? InternalObjectType { get; set; }
Property Value
- byte?
InternalObjectTypeDesc
COLUMN_STORE_DELETE_BITMAP - This bitmap index tracks rows that are marked as deleted from the columnstore. The bitmap is for every rowgroup since partitions can have rows in multiple rowgroups. The rows are that are still physically present and taking up space in the columnstore.
COLUMN_STORE_DELTA_STORE - Stores groups of rows, called rowgroups, that have not been compressed into columnar storage. Each table partition can have zero or more deltastore rowgroups.
COLUMN_STORE_DELETE_BUFFER - For maintaining deletes to updateable nonclustered columnstore indexes. When a query deletes a row from the underlying rowstore table, the delete buffer tracks the deletion from the columnstore. When the number of deleted rows exceed 1048576, they are merged back into the delete bitmap by background Tuple Mover thread or by an explicit Reorganize command. At any given point in time, the union of the delete bitmap and the delete buffer represents all deleted rows.
COLUMN_STORE_MAPPING_INDEX - Used only when the clustered columnstore index has a secondary nonclustered index. This maps nonclustered index keys to the correct rowgroup and row ID in the columnstore. It only stores keys for rows that move to a different rowgroup; this occurs when a delta rowgroup is compressed into the columnstore, and when a merge operation merges rows from two different rowgroups.
[Column("internal_object_type_desc")]
[Nullable]
public string? InternalObjectTypeDesc { get; set; }
Property Value
Object
objects (sys.objects)
[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = false)]
public ObjectSchema.Object Object { get; set; }
Property Value
ObjectID
Object ID for the table that contains the partition.
[Column("object_id")]
[NotNull]
public int ObjectID { get; set; }
Property Value
OptimizeForSequentialKey
1 = Partition has last-page insert optimization enabled.
0 = Default value. Partition has last-page insert optimization disabled.
[Column("optimize_for_sequential_key")]
[NotNull]
public bool OptimizeForSequentialKey { get; set; }
Property Value
PartitionID
Partition ID for this partition. This is unique within a database.
[Column("partition_id")]
[NotNull]
public long PartitionID { get; set; }
Property Value
PartitionNumber
The partition number.
1 = first partition of a partitioned table, or the single partition of a nonpartitioned table.
2 = second partition, and so on.
[Column("partition_number")]
[NotNull]
public int PartitionNumber { get; set; }
Property Value
RowGroupID
ID for the deltastore rowgroup. Each table partition can have zero or more deltastore rowgroups.
[Column("row_group_id")]
[Nullable]
public int? RowGroupID { get; set; }
Property Value
- int?
Rows
Approximate number of rows in this partition.
[Column("rows")]
[Nullable]
public long? Rows { get; set; }
Property Value
- long?