diff --git a/docs/table-design/data-partitioning/auto-partitioning.md b/docs/table-design/data-partitioning/auto-partitioning.md index f336ea9bafcb9..416ac99485359 100644 --- a/docs/table-design/data-partitioning/auto-partitioning.md +++ b/docs/table-design/data-partitioning/auto-partitioning.md @@ -228,7 +228,7 @@ Doris supports both Auto and Dynamic Partition. In this case, both functions are There is no conflict between the two syntaxes, just set the corresponding clauses/attributes at the same time. Please note that it is uncertain whether the partition in current period is created by Auto Partition or Dynamic Partition. Different creation methods will lead to different naming formats for the partitions. -## Best Practice +### Best Practice In scenarios where you need to set a limit on the partition lifecycle, you can **disable the creation of Dynamic Partition, leaving the creation of partitions to be completed by Auto Partition**, and complete the management of the partition lifecycle through the Dynamic Partition's function of dynamically reclaiming partitions: @@ -252,8 +252,12 @@ properties( This way we have both the flexibility of Auto Partition and consistency in partition names. -:::note -In some early versions prior to 2.1.7, this feature was not disabled but not recommended. +## Conjunct with Auto Bucket + +Only AUTO RANGE PARTITION can be used together with the [Auto Bucket](./data-bucketing.md#auto-setting-bucket-number) feature. When using this feature, Doris assumes that the data import is incremental in time order, and each import only involves one partition. In other words, this usage is only recommended for tables that are incrementally imported daily. + +:::warning Note! +If the data import method does not conform to the above pattern, and both auto partitioning and auto bucketing are used at the same time, there is a possibility that the number of buckets in the new partition is extremely unreasonable, which may greatly affect query performance. ::: ## Partition Management diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/data-partitioning/auto-partitioning.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/data-partitioning/auto-partitioning.md index cc1f2a5e1fd11..6d9d30896e908 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/data-partitioning/auto-partitioning.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/data-partitioning/auto-partitioning.md @@ -250,6 +250,14 @@ properties( 这样我们同时具有了 Auto Partition 的灵活性,且分区名上保持了一致性。 +## 与自动分桶联用 + +只有 AUTO RANGE PARTITION 可以同时使用[自动分桶](./data-bucketing.md#自动设置分桶数)功能。使用此功能时,Doris 将假设表的数据导入是按照时间顺序增量的,每次导入仅涉及一个分区。即是说,这种用法仅推荐用于按日增量导入的表。 + +:::warning 注意! +如果数据导入方式不符合上述范式,且同时使用了自动分区和自动分桶,存在新分区的分桶数极不合理的可能,较大影响查询性能。 +::: + ## 分区管理 当启用自动分区后,分区名可以通过 `auto_partition_name` 函数映射到分区。`partitions` 表函数可以通过分区名产生详细的分区信息。仍然以 `DAILY_TRADE_VALUE` 表为例,在我们插入数据后,查看其当前分区: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/table-design/data-partitioning/auto-partitioning.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/table-design/data-partitioning/auto-partitioning.md index 8f9deea86fdc7..62b80bf71ef05 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/table-design/data-partitioning/auto-partitioning.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/table-design/data-partitioning/auto-partitioning.md @@ -253,6 +253,18 @@ properties( 这样我们同时具有了 Auto Partition 的灵活性,且分区名上保持了一致性。 +## 与自动分桶联用 + +:::note +这个功能从 Doris 3.1.1 开始正常工作 +::: + +只有 AUTO RANGE PARTITION 可以同时使用[自动分桶](./data-bucketing.md#自动设置分桶数)功能。使用此功能时,Doris 将假设表的数据导入是按照时间顺序增量的,每次导入仅涉及一个分区。即是说,这种用法仅推荐用于按日增量导入的表。 + +:::warning 注意! +如果数据导入方式不符合上述范式,且同时使用了自动分区和自动分桶,存在新分区的分桶数极不合理的可能,较大影响查询性能。 +::: + ## 分区管理 当启用自动分区后,分区名可以通过 `auto_partition_name` 函数映射到分区。`partitions` 表函数可以通过分区名产生详细的分区信息。仍然以 `DAILY_TRADE_VALUE` 表为例,在我们插入数据后,查看其当前分区: diff --git a/versioned_docs/version-3.x/table-design/data-partitioning/auto-partitioning.md b/versioned_docs/version-3.x/table-design/data-partitioning/auto-partitioning.md index 7f041092e4077..49f8b013ca719 100644 --- a/versioned_docs/version-3.x/table-design/data-partitioning/auto-partitioning.md +++ b/versioned_docs/version-3.x/table-design/data-partitioning/auto-partitioning.md @@ -232,7 +232,7 @@ There is no conflict between the two syntaxes, just set the corresponding clause This feature has been supported since Doris 3.0.3 ::: -## Best Practice +### Best Practice In scenarios where you need to set a limit on the partition lifecycle, you can **disable the creation of Dynamic Partition, leaving the creation of partitions to be completed by Auto Partition**, and complete the management of the partition lifecycle through the Dynamic Partition's function of dynamically reclaiming partitions: @@ -260,6 +260,18 @@ This way we have both the flexibility of Auto Partition and consistency in parti In some early versions prior to 2.1.7, this feature was not disabled but not recommended. ::: +## Conjunct with Auto Bucket + +:::note +This feature has been working normally since Doris 3.1.1 +::: + +Only AUTO RANGE PARTITION can be used together with the [Auto Bucket](./data-bucketing.md#auto-setting-bucket-number) feature. When using this feature, Doris assumes that the data import is incremental in time order, and each import only involves one partition. In other words, this usage is only recommended for tables that are incrementally imported daily. + +:::warning Note! +If the data import method does not conform to the above pattern, and both auto partitioning and auto bucketing are used at the same time, there is a possibility that the number of buckets in the new partition is extremely unreasonable, which may greatly affect query performance. +::: + ## Partition Management :::tip