.show 盘区.show extents

从指定的数据库或表中显示盘区。Shows extents from a specified database or table.

备注

在 Kusto 中,数据分片被称为“盘区”,所有命令都将“extent”或“extents”作为同义词使用。Data shards are called extents in Kusto, and all commands use "extent" or "extents" as a synonym. 若要详细了解盘区,请参阅盘区(数据分片)概述For more information on extents, see Extents (Data Shards) Overview.

群集级别Cluster level

.show cluster extents [hot].show cluster extents [hot]

显示有关群集中存在的盘区(数据分片)的信息。Shows information about extents (data shards) that are present in the cluster. 如果指定了 hot - 仅显示应位于热缓存中的盘区。If hot is specified - shows only extents that are expected to be in the hot cache.

数据库级别Database level

.show database DatabaseName extents [(ExtentId1,...,ExtentIdN)] [hot] [where tags (has|contains|!has|!contains) Tag1 [and tags (has|contains|!has|!contains) Tag2...]].show database DatabaseName extents [(ExtentId1,...,ExtentIdN)] [hot] [where tags (has|contains|!has|!contains) Tag1 [and tags (has|contains|!has|!contains) Tag2...]]

显示有关指定数据库中存在的盘区(数据分片)的信息。Shows information about extents (data shards) that are present in the specified database. 如果指定了 hot - 仅显示应位于热缓存中的盘区。If hot is specified - shows only extents that expected to be in the hot cache.

表级别Table level

.show table TableName extents [(ExtentId1,...,ExtentIdN)] [hot] [where tags (has|contains|!has|!contains) Tag1 [and tags (has|contains|!has|!contains) Tag2...]].show table TableName extents [(ExtentId1,...,ExtentIdN)] [hot] [where tags (has|contains|!has|!contains) Tag1 [and tags (has|contains|!has|!contains) Tag2...]]

.show tables (TableName1,...,TableNameN) extents [(ExtentId1,...,ExtentIdN)] [hot] [where tags (has|contains|!has|!contains) Tag1 [and tags (has|contains|!has|!contains) Tag2...]].show tables (TableName1,...,TableNameN) extents [(ExtentId1,...,ExtentIdN)] [hot] [where tags (has|contains|!has|!contains) Tag1 [and tags (has|contains|!has|!contains) Tag2...]]

显示有关指定表中存在的盘区(数据分片)的信息。Shows information about extents (data shards) that are present in the specified tables. 数据库取自命令的上下文。The database is taken from the command's context. 如果指定了 hot则仅显示应位于热缓存中的盘区。If hot is specified, shows only extents that are expected to be in the hot cache.

备注Notes

  • 使用数据库或表级别命令比筛选(添加 | where DatabaseName == '...' and TableName == '...')群集级别命令的结果要快得多。Using database or table level commands is much faster than filtering (adding | where DatabaseName == '...' and TableName == '...') the results of a cluster-level command.
  • 如果提供了盘区 ID 的可选列表,则返回的数据集仅限于这些盘区。If the optional list of extent IDs is provided, the returned data set is limited to those extents only.
    • 此方法比筛选(将 | where ExtentId in(...) 添加到)“bare”命令的结果要快得多。This method is much faster than filtering (adding | where ExtentId in(...) to) the results of "bare" commands.
  • 如果指定了 tags 筛选器:If tags filters are specified:
    • 返回的列表仅限于标记集合遵循所有提供的标记筛选条件的盘区。The returned list is limited to those extents whose tags collection obeys all of the provided tags filters.
    • 此方法比筛选(将 | where Tags has '...' and Tags contains '...' 添加到)“bare”命令的结果要快得多。This method is much faster than filtering (adding | where Tags has '...' and Tags contains '...' to) the results of "bare" commands.
    • has 筛选器是相等性筛选器。has filters are equality filters. 将筛选出未使用任何指定标记标记的盘区。Extents that aren't tagged with either of the specified tags will be filtered out.
    • !has 筛选器是相等负筛选器。!has filters are equality negative filters. 将筛选出使用任何指定标记标记的盘区。Extents that are tagged with either of the specified tags will be filtered out.
    • contains 筛选器是不区分大小写的子字符串筛选器。contains filters are case-insensitive substring filters. 将筛选出未将指定字符串作为其任何标记的子字符串的盘区。Extents that don't have the specified strings as a substring of any of their tags will be filtered out.
    • !contains 筛选器是不区分大小写的子字符串负筛选器。!contains filters are case-insensitive substring negative filters. 将筛选出其所带的任何标记的包含指定字符串的盘区。Extents that have the specified strings as a substring of any of their tags will be filtered out.

输出参数Output parameters

输出参数Output parameter 类型Type 说明Description
ExtentIdExtentId GuidGuid 盘区 IDID of the extent
DatabaseNameDatabaseName StringString 盘区所属的数据库Database that the extent belongs to
TableNameTableName 字符串String 盘区所属的表Table that the extents belong to
MaxCreatedOnMaxCreatedOn DateTimeDateTime 创建盘区时的日期时间。Date-time when the extent was created. 对于合并的盘区,则是源盘区中创建时间的最大值For a merged extent, the maximum of creation times among source extents
OriginalSizeOriginalSize DoubleDouble 盘区数据的原始大小(以字节为单位)Original size in bytes of the extent data
ExtentSizeExtentSize DoubleDouble 内存中的盘区大小(已压缩 + 索引)Size of the extent in memory (compressed + index)
CompressedSizeCompressedSize DoubleDouble 内存中盘区数据的压缩大小Compressed size of the extent data in memory
IndexSizeIndexSize DoubleDouble 盘区数据的索引大小Index size of the extent data
Blocks LongLong 盘区中的数据块数Number of data blocks in the extent
段数Segments LongLong 盘区中的数据段数Number of data segments in the extent
AssignedDataNodesAssignedDataNodes StringString 已弃用(空字符串)Deprecated (an empty string)
LoadedDataNodesLoadedDataNodes StringString 已弃用(空字符串)Deprecated (an empty string)
ExtentContainerIdExtentContainerId StringString 盘区所在的盘区容器的 IDID of the extent container the extent is in
RowCountRowCount LongLong 盘区中的行数Number of rows in the extent
MinCreatedOnMinCreatedOn DateTimeDateTime 创建盘区时的日期时间。Date-time when the extent was created. 对于合并的盘区,则是源盘区中创建时间的最小值For a merged extent, the minimum of creation times among the source extents
TagsTags StringString 为盘区定义的标记(如果有)Tags, if any, defined for the extent

示例Examples

标记的盘区Tagged extent

T 中的盘区 E 用标记 aaaBBBccc 进行标记。Extent E in table T is tagged with tags aaa, BBB, and ccc.

  • 此查询将返回 EThis query will return E:

      .show table T extents where tags has 'aaa' and tags contains 'bb'
    
  • 此查询不会返回 E,因为它未标记 aaThis query won't return E since it isn't tagged with aa:

      .show table T extents where tags has 'aa' and tags contains 'bb'
    
  • 此查询将返回 EThis query will return E:

      .show table T extents where tags contains 'aaa' and tags contains 'bb' 
    

显示创建的盘区量Show volume of extents created

显示每小时在特定数据库中创建的盘区量Show volume of extents being created per hour in a specific database

.show database MyDatabase extents | summarize count(ExtentId) by MaxCreatedOn bin=time(1h) | render timechart  

显示每个表每小时到达的数据量Show volume of data arriving by table per hour

.show database MyDatabase extents  
| summarize sum(OriginalSize) by TableName, MaxCreatedOn bin=time(1h)  
| render timechart

显示每个表的数据大小分布Show data size distribution by table

.show database MyDatabase extents | summarize sum(OriginalSize) by TableName

显示名为“GamesDB”的数据库中的所有盘区Show all extents in the database named 'GamesDB'

.show database GamesDB extents

显示名为“Games”的表中的所有盘区Show all extents in the table named 'Games'

.show table Games extents

显示特定表中的所有盘区Show all extents in specific tables

显示名为“TaggingGames1”和“TaggingGames2”并标记为“tag1”和“tag2”的表中的所有盘区Show all extents in the tables named 'TaggingGames1' and 'TaggingGames2', tagged with both 'tag1' and 'tag2'

.show tables (TaggingGames1,TaggingGames2) extents where tags has 'tag1' and tags has 'tag2'