sys.column_store_dictionaries (Transact-SQL)sys.column_store_dictionaries (Transact-SQL)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

xVelocity 内存优化的列存储索引中使用的每个字典各占一行。Contains a row for each dictionary used in xVelocity memory optimized columnstore indexes. 字典用于对某些而非全部数据类型进行编码,因此并非列存储索引中的所有列都有字典。Dictionaries are used to encode some, but not all data types, therefore not all columns in a columnstore index have dictionaries. 字典可以作为主字典存在(对于所有段),也可能作为用于部分列段的其他辅助字典存在。A dictionary can exist as a primary dictionary (for all segments) and possibly for other secondary dictionaries used for a subset of the column's segments.

列名称Column name 数据类型Data type 说明Description
hobt_idhobt_id bigintbigint 具有此列存储索引的表的堆或B 树索引 (HoBT) 的 ID。ID of the heap or B-tree index (HoBT) for the table that has this columnstore index.
column_idcolumn_id intint 以1开头的列存储列的 ID。ID of the columnstore column starting with 1. 第一列的 ID 为1,第二列的 ID = 2,等等。The first column has ID = 1, the second column has ID = 2, etc.
dictionary_iddictionary_id intint 可以有两种类型的字典:全局和本地,与列段关联。There can be two kinds of dictionaries, global and local, associated with a column segment. Dictionary_id 为0表示在所有列段之间共享的全局字典 (为该列) 每个行组。A dictionary_id of 0 represents the global dictionary that is shared across all column segments (one for each row group) for that column.
versionversion intint 字典格式的版本。Version of the dictionary format.
typetype intint 字典类型:Dictionary type:

1-包含 int 值的哈希字典1 - Hash dictionary containing int values

2-未使用2 - Not used

3-包含字符串值的哈希字典3 - Hash dictionary containing string values

包含 浮点 值的4哈希字典4 - Hash dictionary containing float values

有关字典的详细信息,请参阅 列存储索引指南For more information about dictionaries, see Columnstore Indexes Guide.
last_idlast_id intint 字典中的最后一个数据 ID。The last data ID in the dictionary.
entry_countentry_count bigintbigint 字典中的条目数。Number of entries in the dictionary.
on_disk_sizeon_disk_size bigintbigint 字典大小(以字节为单位)。Size of dictionary in bytes.
partition_idpartition_id bigintbigint 指示分区 ID。Indicates the partition ID. 在数据库中是唯一的。Is unique within a database.


要求对表具有 VIEW DEFINITION 权限。Requires VIEW DEFINITION permission on the table. 以下各列将返回 null,除非用户也具有 SELECT 权限: last_id、entry_count data_ptr。The following columns return null unless the user also has SELECT permission: last_id, entry_count, data_ptr.

目录视图中仅显示用户拥有的安全对象的元数据,或用户对其拥有某些权限的安全对象的元数据。The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. 有关详细信息,请参阅 Metadata Visibility ConfigurationFor more information, see Metadata Visibility Configuration.

另请参阅See Also

对象目录视图 (Transact-SQL) Object Catalog Views (Transact-SQL)
目录视图 (Transact-SQL) Catalog Views (Transact-SQL)
查询 SQL Server 系统目录常见问题 Querying the SQL Server System Catalog FAQ
sys.columns (Transact-SQL) sys.columns (Transact-SQL)
sys. all_columns (Transact-sql) sys.all_columns (Transact-SQL)
sys. computed_columns (Transact-sql) sys.computed_columns (Transact-SQL)
列存储索引指南 Columnstore Indexes Guide
列存储索引指南 Columnstore Indexes Guide
sys.column_store_segments (Transact-SQL)sys.column_store_segments (Transact-SQL)