数据分片策略Data sharding policy

分片策略定义了 Azure 数据资源管理器群集中的盘区(数据分片)是否应该密封以及如何密封。The sharding policy defines if and how Extents (data shards) in the Azure Data Explorer cluster should be sealed.

备注

此策略适用于创建新盘区的所有操作,例如用于数据引入的命令以及 .merge 和 .rebuild 命令The policy applies to all operations that create new extents, such as commands for data ingestion, and .merge and .rebuild commands

数据分片策略包含以下属性:The data sharding policy contains the following properties:

  • MaxRowCountMaxRowCount:

    • 由引入操作或重新生成操作创建的盘区的最大行计数。Maximum row count for an extent created by an ingestion or rebuild operation.
    • 默认值为 750,000。Defaults to 750,000.
    • 合并操作无效。Not in effect for merge operations.
      • 如果必须限制由合并操作创建的盘区中的行数,请在实体的盘区合并策略中调整 RowCountUpperBoundForMerge 属性。If you must limit the number of rows in extents created by merge operations, adjust the RowCountUpperBoundForMerge property in the entity's extents merge policy.
  • MaxExtentSizeInMbMaxExtentSizeInMb:

    • 由合并操作创建的盘区允许的最大压缩数据大小(以 MB 为单位)。Maximum allowed compressed data size (in megabytes) for an extent created by a merge operation.
    • 仅对合并操作有效。In effect only for merge operations.
    • 默认值为 1,024 (1GB)。Defaults to 1,024 (1GB).
  • MaxOriginalSizeInMbMaxOriginalSizeInMb:

    • 由重新生成操作创建的盘区允许的最大原始数据大小(以 MB 为单位)。Maximum allowed original data size (in megabytes) for an extent created by a rebuild operation.
    • 仅对重新生成操作有效。In effect only for rebuild operations.
    • 默认值为 2,048 (2GB)。Defaults to 2,048 (2GB).

警告

更改数据分片策略之前,请咨询 Azure 数据资源管理器团队。Consult with the Azure Data Explorer team before altering a data sharding policy.

创建数据库时,它包含默认的数据分片策略。When a database is created, it contains the default data sharding policy. 此策略由数据库中创建的所有表继承(除非在表级别显式重写该策略)。This policy is inherited by all tables created in the database (unless the policy is explicitly overridden at the table level).

使用分片策略控制命令管理数据库和表的数据分片策略。Use the sharding policy control commands) to manage data sharding policies for databases and tables.