Class ObjectSchema.ColumnStoreSegment
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
sys.column_store_segments (Transact-SQL)
Applies to: √ SQL Server (all supported versions)
Returns one row for each column segment in a columnstore index. There is one column segment per column per rowgroup. For example, a table with 10 rowgroups and 34 columns returns 340 rows.
[Table(Schema = "sys", Name = "column_store_segments", IsView = true)]
public class ObjectSchema.ColumnStoreSegment
- Inheritance
-
ObjectSchema.ColumnStoreSegment
- Extension Methods
Properties
BaseID
Base value ID if encoding type 1 is being used. If encoding type 1 is not being used, base_id is set to -1.
[Column("base_id")]
[Nullable]
public long? BaseID { get; set; }
Property Value
- long?
ColumnID
ID of the columnstore column.
[Column("column_id")]
[Nullable]
public int? ColumnID { get; set; }
Property Value
- int?
EncodingType
Type of encoding used for that segment:
1 = VALUE_BASED - non-string/binary with no dictionary (similar to 4 with some internal variations)
2 = VALUE_HASH_BASED - non-string/binary column with common values in dictionary
3 = STRING_HASH_BASED - string/binary column with common values in dictionary
4 = STORE_BY_VALUE_BASED - non-string/binary with no dictionary
5 = STRING_STORE_BY_VALUE_BASED - string/binary with no dictionary
For more information, see the Remarks section.
[Column("encoding_type")]
[Nullable]
public int? EncodingType { get; set; }
Property Value
- int?
HasNulls
1 if the column segment has null values.
[Column("has_nulls")]
[Nullable]
public int? HasNulls { get; set; }
Property Value
- int?
HoBTID
ID of the heap or B-tree index (HoBT) for the table that has this columnstore index.
[Column("hobt_id")]
[Nullable]
public long? HoBTID { get; set; }
Property Value
- long?
Magnitude
Magnitude if encoding type 1 is being used. If encoding type 1 is not being used, magnitude is set to -1.
[Column("magnitude")]
[Nullable]
public double? Magnitude { get; set; }
Property Value
MaxDataID
Maximum data ID in the column segment.
[Column("max_data_id")]
[Nullable]
public long? MaxDataID { get; set; }
Property Value
- long?
MinDataID
Minimum data ID in the column segment.
[Column("min_data_id")]
[Nullable]
public long? MinDataID { get; set; }
Property Value
- long?
NullValue
Value used to represent nulls.
[Column("null_value")]
[Nullable]
public long? NullValue { get; set; }
Property Value
- long?
OnDiskSize
Size of segment in bytes.
[Column("on_disk_size")]
[Nullable]
public long? OnDiskSize { get; set; }
Property Value
- long?
PartitionID
Indicates the partition ID. Is unique within a database.
[Column("partition_id")]
[Nullable]
public long? PartitionID { get; set; }
Property Value
- long?
PrimaryDictionaryID
A value of 0 represents the global dictionary. A value of -1 indicates that there is no global dictionary created for this column.
[Column("primary_dictionary_id")]
[Nullable]
public int? PrimaryDictionaryID { get; set; }
Property Value
- int?
RowCount
Number of rows in the row group.
[Column("row_count")]
[Nullable]
public int? RowCount { get; set; }
Property Value
- int?
SecondaryDictionaryID
A non-zero value points to the local dictionary for this column in the current segment (i.e. the rowgroup). A value of -1 indicates that there is no local dictionary for this segment.
[Column("secondary_dictionary_id")]
[Nullable]
public int? SecondaryDictionaryID { get; set; }
Property Value
- int?
SegmentID
ID of the rowgroup. For backward compatibility, the column name continues to be called segment_id even though this is the rowgroup ID. You can uniquely identify a segment using <hobt_id, partition_id, column_id>, <segment_id>.
[Column("segment_id")]
[Nullable]
public int? SegmentID { get; set; }
Property Value
- int?
Version
Version of the column segment format.
[Column("version")]
[Nullable]
public int? Version { get; set; }
Property Value
- int?