This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new daf554ed82b [doc](fix) update materialized view docs (#513)
daf554ed82b is described below

commit daf554ed82b01a9f90f78e0b5bd3b6ca17b5f399
Author: lihuigang <[email protected]>
AuthorDate: Sun Sep 1 23:27:19 2024 +0800

    [doc](fix) update materialized view docs (#513)
    
    Can not drop column contained by mv, The detailed information is as
    follows:
    ALTER TABLE sales_records DROP COLUMN store_id Error Code: 1105. errCode
    = 2, detailMessage = Can not drop column contained by mv, mv=store_amt
    0.014 sec
    
    ---------
    
    Co-authored-by: lihuigang <[email protected]>
---
 .../view-materialized-view/materialized-view.md    |  2 +-
 .../view-materialized-view/materialized-view.md    | 87 ++++++++--------------
 .../query-acceleration/materialized-view.md        |  2 +-
 .../view-materialized-view/materialized-view.md    |  2 +-
 .../view-materialized-view/materialized-view.md    |  2 +-
 .../view-materialized-view/materialized-view.md    |  2 +-
 .../query-acceleration/materialized-view.md        |  2 +-
 .../view-materialized-view/materialized-view.md    |  2 +-
 .../view-materialized-view/materialized-view.md    |  2 +-
 .../view-materialized-view/materialized-view.md    |  2 +-
 10 files changed, 39 insertions(+), 66 deletions(-)

diff --git a/docs/query/view-materialized-view/materialized-view.md 
b/docs/query/view-materialized-view/materialized-view.md
index 832b72af208..e0d0943cd91 100644
--- a/docs/query/view-materialized-view/materialized-view.md
+++ b/docs/query/view-materialized-view/materialized-view.md
@@ -524,7 +524,7 @@ In `Doris 2.0`, we have made some enhancements to the 
expressions supported by t
 
 ## Limitations
 
-1. If the condition column of the delete statement does not exist in the 
materialized view, the delete operation cannot be performed. If you must delete 
the data, you need to delete the materialized view before deleting the data.
+1. If the condition column of the delete statement exists in the materialized 
view, the delete operation cannot be performed. If you must delete the data, 
you need to delete the materialized view before deleting the data.
 2. Too many materialized views on a single table will affect the efficiency of 
import: when importing data, the materialized view and Base table data are 
updated synchronously. If a table has more than 10 materialized views, the 
import speed may be slow. slow. This is the same as if a single import needs to 
import 10 table data at the same time.
 3. For the Unique Key data model, the materialized view can only change the 
order of the columns and cannot perform aggregation. Therefore, it is not 
possible to perform coarse-grained aggregation operations on the data by 
creating a materialized view on the Unique Key model.
 4. At present, the rewriting behavior of some optimizers to SQL may cause the 
materialized view to fail to be hit. For example, k1+1-1 is rewritten as k1, 
between is rewritten as <= and >=, and day is rewritten as dayofmonth. In this 
case, you need to manually adjust the statements of the query and materialized 
view.
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/view-materialized-view/materialized-view.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/view-materialized-view/materialized-view.md
index 5926e124973..a287c7e3a62 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/view-materialized-view/materialized-view.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query/view-materialized-view/materialized-view.md
@@ -1,6 +1,6 @@
 ---
 {
-    "title": "同步物化视图",
+    "title": "物化视图",
     "language": "zh-CN"
 }
 ---
@@ -24,7 +24,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-
+# 物化视图
 
 物化视图是将预先计算(根据定义好的 SELECT 语句)好的数据集,存储在 Doris 中的一个特殊的表。
 
@@ -33,24 +33,17 @@ under the License.
 ## 适用场景
 
 - 分析需求覆盖明细数据查询以及固定维度查询两方面。
-
 - 查询仅涉及表中的很小一部分列或行。
-
 - 查询包含一些耗时处理操作,比如:时间很久的聚合操作等。
-
 - 查询需要匹配不同前缀索引。
 
 ## 优势
 
 - 对于那些经常重复的使用相同的子查询结果的查询性能大幅提升。
-
 - Doris 自动维护物化视图的数据,无论是新的导入,还是删除操作都能保证 Base 表和物化视图表的数据一致性,无需任何额外的人工维护成本。
-
 - 查询时,会自动匹配到最优物化视图,并直接从物化视图中读取数据。
 
-:::note
-_自动维护物化视图的数据会造成一些维护开销,会在后面的物化视图的局限性中展开说明。_
-:::
+*自动维护物化视图的数据会造成一些维护开销,会在后面的物化视图的局限性中展开说明。*
 
 ## 物化视图 VS Rollup
 
@@ -58,7 +51,7 @@ _自动维护物化视图的数据会造成一些维护开销,会在后面的
 
 物化视图则在覆盖了 Rollup 的功能的同时,还能支持更丰富的聚合函数。所以物化视图其实是 Rollup 的一个超集。
 
-也就是说,之前 [ALTER TABLE ADD 
ROLLUP](../../sql-manual/sql-statements/Data-Definition-Statements/Alter/ALTER-TABLE-ROLLUP)
 语法支持的功能现在均可以通过 [CREATE MATERIALIZED 
VIEW](../../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW)
 实现。
+也就是说,之前 [ALTER TABLE ADD 
ROLLUP](../sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-ROLLUP.md)
 语法支持的功能现在均可以通过 [CREATE MATERIALIZED 
VIEW](../sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md)
 实现。
 
 ## 使用物化视图
 
@@ -69,7 +62,6 @@ Doris 系统提供了一整套对物化视图的 DDL 语法,包括创建,查
 这里首先你要根据你的查询语句的特点来决定创建一个什么样的物化视图。这里并不是说你的物化视图定义和你的某个查询语句一模一样就最好。这里有两个原则:
 
 1. 从查询语句中**抽象**出,多个查询共有的分组和聚合方式作为物化视图的定义。
-
 2. 不需要给所有维度组合都创建物化视图。
 
 首先第一个点,一个物化视图如果抽象出来,并且多个查询都可以匹配到这张物化视图。这种物化视图效果最好。因为物化视图的维护本身也需要消耗资源。
@@ -82,36 +74,30 @@ Doris 系统提供了一整套对物化视图的 DDL 语法,包括创建,查
 
 创建物化视图是一个异步的操作,也就是说用户成功提交创建任务后,Doris 会在后台对存量的数据进行计算,直到创建成功。
 
-具体的语法可查看[CREATE MATERIALIZED 
VIEW](../../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW)
 。
-
+具体的语法可查看[CREATE MATERIALIZED 
VIEW](../sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md)
 。
 
 
-:::tip
-自 Doris 2.0 版本起支持以下功能
-:::
+<version since="2.0.0"></version>
 
-在`Doris 2.0`版本中我们对物化视图的做了一些增强 
(在本文的`最佳实践4`中有具体描述)。我们建议用户在正式的生产环境中使用物化视图前,先在测试环境中确认是预期中的查询能否命中想要创建的物化视图。
+在`Doris 
2.0`版本中我们对物化视图的做了一些增强(在本文的`最佳实践4`中有具体描述)。我们建议用户在正式的生产环境中使用物化视图前,先在测试环境中确认是预期中的查询能否命中想要创建的物化视图。
 
 如果不清楚如何验证一个查询是否命中物化视图,可以阅读本文的`最佳实践1`。
 
-与此同时,我们不建议用户在同一张表上建多个形态类似的物化视图,这可能会导致多个物化视图之间的冲突使得查询命中失败 
(在新优化器中这个问题会有所改善)。建议用户先在测试环境中验证物化视图和查询是否满足需求并能正常使用。
+与此同时,我们不建议用户在同一张表上建多个形态类似的物化视图,这可能会导致多个物化视图之间的冲突使得查询命中失败(在新优化器中这个问题会有所改善)。建议用户先在测试环境中验证物化视图和查询是否满足需求并能正常使用。
 
 ### 支持聚合函数
 
 目前物化视图创建语句支持的聚合函数有:
 
 - SUM, MIN, MAX (Version 0.12)
-
 - COUNT, BITMAP_UNION, HLL_UNION (Version 0.13)
+- 
[通用聚合](https://doris.apache.org/zh-CN/docs/sql-manual/sql-reference/Data-Types/AGG_STATE?_highlight=agg_state)
 (Version 2.0)
 
-- [通用聚合](../../sql-manual/sql-data-types/aggregate/AGG_STATE) (Version 2.0)
-
-  一些不在原有的支持范围内的聚合函数,会被转化为 agg_state 类型来实现预聚合。
-
+一些不在原有的支持范围内的聚合函数,会被转化为agg_state类型来实现预聚合。
 
 ### 更新策略
 
-为保证物化视图表和 Base 表的数据一致性,Doris 会将导入,删除等对 Base 
表的操作都同步到物化视图表中。并且通过增量更新的方式来提升更新效率。通过事务方式来保证原子性。
+为保证物化视图表和 Base 表的数据一致性, Doris 会将导入,删除等对 Base 
表的操作都同步到物化视图表中。并且通过增量更新的方式来提升更新效率。通过事务方式来保证原子性。
 
 比如如果用户通过 INSERT 命令插入数据到 Base 表中,则这条数据会同步插入到物化视图中。当 Base 表和物化视图表均写入成功后,INSERT 
命令才会成功返回。
 
@@ -132,7 +118,7 @@ Doris 系统提供了一整套对物化视图的 DDL 语法,包括创建,查
 | bitmap_union | bitmap_union, bitmap_union_count, count(distinct)      |
 | hll_union    | hll_raw_agg, hll_union_agg, ndv, approx_count_distinct |
 
-其中 bitmap 和 hll 的聚合函数在查询匹配到物化视图后,查询的聚合算子会根据物化视图的表结构进行改写。详细见实例 2。
+其中 bitmap 和 hll 的聚合函数在查询匹配到物化视图后,查询的聚合算子会根据物化视图的表结构进行改写。详细见实例2。
 
 ### 查询物化视图
 
@@ -168,13 +154,13 @@ MySQL [test]> desc mv_test all;
 
 如果用户不再需要物化视图,则可以通过命令删除物化视图。
 
-具体的语法可查看[DROP MATERIALIZED 
VIEW](../../sql-manual/sql-statements/Data-Definition-Statements/Drop/DROP-MATERIALIZED-VIEW)
 
+具体的语法可查看[DROP MATERIALIZED 
VIEW](../sql-manual/sql-reference/Data-Definition-Statements/Drop/DROP-MATERIALIZED-VIEW.md)
 
 
 ### 查看已创建的物化视图
 
 用户可以通过命令查看已创建的物化视图的
 
-具体的语法可查看[SHOW CREATE MATERIALIZED 
VIEW](../../sql-manual/sql-statements/Show-Statements/SHOW-CREATE-MATERIALIZED-VIEW)
+具体的语法可查看[SHOW CREATE MATERIALIZED 
VIEW](../sql-manual/sql-reference/Show-Statements/SHOW-CREATE-MATERIALIZED-VIEW.md)
 
 ### 取消创建物化视图
 
@@ -182,14 +168,12 @@ MySQL [test]> desc mv_test all;
  CANCEL ALTER TABLE MATERIALIZED VIEW FROM db_name.table_name
 ```
 
-## 最佳实践 1
+## 最佳实践1
 
 使用物化视图一般分为以下几个步骤:
 
 1. 创建物化视图
-
 2. 异步检查物化视图是否构建完成
-
 3. 查询并自动匹配物化视图
 
 **首先是第一步:创建物化视图**
@@ -238,7 +222,7 @@ SHOW ALTER TABLE ROLLUP FROM db_name; (Version 0.12)
 SHOW ALTER TABLE MATERIALIZED VIEW FROM db_name; (Version 0.13)
 ```
 
-这个命令中 `db_name` 是一个参数,你需要替换成自己真实的 db 名称。命令的结果是显示这个 db 的所有创建物化视图的任务。结果如下:
+这个命令中 `db_name` 是一个参数, 你需要替换成自己真实的 db 名称。命令的结果是显示这个 db 的所有创建物化视图的任务。结果如下:
 
 ```sql
 
+-------+---------------+---------------------+---------------------+---------------+-----------------+----------+---------------+-----------+-------------------------------------------------------------------------------------------------------------------------+----------+---------+
@@ -318,9 +302,9 @@ EXPLAIN SELECT store_id, sum(sale_amt) FROM sales_records 
GROUP BY store_id;
 ```
 
从最底部的`test.sales_records(store_amt)`可以表明这个查询命中了`store_amt`这个物化视图。值得注意的是,如果表中没有数据,那么可能不会命中物化视图。
 
-## 最佳实践 2(UV,PV)
+## 最佳实践2 PV,UV
 
-业务场景:计算广告的 UV,PV。
+业务场景: 计算广告的 UV,PV。
 
 假设用户的原始广告点击数据存储在 Doris,那么针对广告 PV, UV 查询就可以通过创建 `bitmap_union` 的物化视图来提升查询速度。
 
@@ -356,7 +340,7 @@ MySQL [test]> desc advertiser_view_record;
 
    针对这种求 UV 的场景,我们就可以创建一个带 `bitmap_union` 的物化视图从而达到一个预先精确去重的效果。
 
-   在 Doris 中,`count(distinct)` 聚合的结果和 
`bitmap_union_count`聚合的结果是完全一致的。而`bitmap_union_count` 等于 `bitmap_union` 的结果求 
count,所以如果查询中**涉及到 `count(distinct)` 则通过创建带 `bitmap_union` 聚合的物化视图方可加快查询**。
+   在 Doris 中,`count(distinct)` 聚合的结果和 
`bitmap_union_count`聚合的结果是完全一致的。而`bitmap_union_count` 等于 `bitmap_union` 的结果求 
count, 所以如果查询中**涉及到 `count(distinct)` 则通过创建带 `bitmap_union` 聚合的物化视图方可加快查询**。
 
    针对这个 Case,则可以创建一个根据广告和渠道分组,对 `user_id` 进行精确去重的物化视图。
 
@@ -365,11 +349,9 @@ MySQL [test]> desc advertiser_view_record;
    Query OK, 0 rows affected (0.012 sec)
    ```
 
-   :::caution
-   注意:因为本身 user_id 是一个 INT 类型,所以在 Doris 中需要先将字段通过函数 `to_bitmap` 转换为 bitmap 
类型然后才可以进行 `bitmap_union` 聚合。
-   :::
+   *注意:因为本身 user_id 是一个 INT 类型,所以在 Doris 中需要先将字段通过函数 `to_bitmap` 转换为 bitmap 
类型然后才可以进行 `bitmap_union` 聚合。*
 
-   创建完成后,广告点击明细表和物化视图表的表结构如下:
+   创建完成后, 广告点击明细表和物化视图表的表结构如下:
 
    ```sql
    MySQL [test]> desc advertiser_view_record all;
@@ -461,11 +443,11 @@ MySQL [test]> desc advertiser_view_record;
 
    其次对于 `user_id` 字段求 `count(distinct)` 被改写为求 
`bitmap_union_count(to_bitmap)`。也就是通过 Bitmap 的方式来达到精确去重的效果。
 
-## 最佳实践 3
+## 最佳实践3
 
 业务场景:匹配更丰富的前缀索引
 
-用户的原始表有(k1, k2, k3)三列。其中 k1, k2 为前缀索引列。这时候如果用户查询条件中包含 `where k1=1 and k2=2` 
就能通过索引加速查询。
+用户的原始表有 (k1, k2, k3) 三列。其中 k1, k2 为前缀索引列。这时候如果用户查询条件中包含 `where k1=1 and k2=2` 
就能通过索引加速查询。
 
 但是有些情况下,用户的过滤条件无法匹配到前缀索引,比如 `where k3=3`。则无法通过索引提升查询速度。
 
@@ -504,9 +486,9 @@ MySQL [test]> desc advertiser_view_record;
 
    这时候查询就会直接从刚才创建的 mv_1 物化视图中读取数据。物化视图对 k3 是存在前缀索引的,查询效率也会提升。
 
-## 最佳实践 4
-
+## 最佳实践4
 
+<version since="2.0.0"></version>
 
 在`Doris 2.0`中,我们对物化视图所支持的表达式做了一些增强,本示例将主要体现新版本物化视图对各种表达式的支持和提前过滤。
 
@@ -528,14 +510,12 @@ insert into d_table select 3,-3,null,'2022-02-20';
 ```
 
 2. 创建一些物化视图。
-
 ```sql
 create materialized view k1a2p2ap3ps as select 
abs(k1)+k2+1,sum(abs(k2+2)+k3+3) from d_table group by abs(k1)+k2+1;
 create materialized view kymd as select year(k4),month(k4) from d_table where 
year(k4) = 2020; // 提前用where表达式过滤以减少物化视图中的数据量。
 ```
 
 3. 用一些查询测试是否成功命中物化视图。
-
 ```sql
 select abs(k1)+k2+1,sum(abs(k2+2)+k3+3) from d_table group by abs(k1)+k2+1; // 
命中k1a2p2ap3ps
 select bin(abs(k1)+k2+1),sum(abs(k2+2)+k3+3) from d_table group by 
bin(abs(k1)+k2+1); // 命中k1a2p2ap3ps
@@ -545,24 +525,17 @@ select year(k4)+month(k4) from d_table where year(k4) = 
2020; // 命中kymd
 
 ## 局限性
 
-1. 如果删除语句的条件列,在物化视图中不存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
-
+1. 如果删除语句的条件列,在物化视图不存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
 2. 单表上过多的物化视图会影响导入的效率:导入数据时,物化视图和 Base 表数据是同步更新的,如果一张表的物化视图表超过 10 
张,则有可能导致导入速度很慢。这就像单次导入需要同时导入 10 张表数据是一样的。
-
-3. 物化视图针对 Unique Key 数据模型,只能改变列顺序,不能起到聚合的作用,所以在 Unique Key 
模型上不能通过创建物化视图的方式对数据进行粗粒度聚合操作
-
-4. 目前一些优化器对 sql 的改写行为可能会导致物化视图无法被命中,例如 k1+1-1 被改写成 k1,between 被改写成<=和>=,day 
被改写成 dayofmonth,遇到这种情况需要手动调整下查询和物化视图的语句。
+3. 物化视图针对 Unique Key数据模型,只能改变列顺序,不能起到聚合的作用,所以在Unique 
Key模型上不能通过创建物化视图的方式对数据进行粗粒度聚合操作
+4. 
目前一些优化器对sql的改写行为可能会导致物化视图无法被命中,例如k1+1-1被改写成k1,between被改写成<=和>=,day被改写成dayofmonth,遇到这种情况需要手动调整下查询和物化视图的语句。
 
 ## 异常错误
 
-**1. DATA_QUALITY_ERROR: "The data quality does not satisfy, please check your 
data"**
+1. DATA_QUALITY_ERROR: "The data quality does not satisfy, please check your 
data" 由于数据质量问题或者 Schema Change 
内存使用超出限制导致物化视图创建失败。如果是内存问题,调大`memory_limitation_per_thread_for_schema_change_bytes`参数即可。
 注意:to_bitmap 的参数仅支持正整型, 如果原始数据中存在负数,会导致物化视图创建失败。String 类型的字段可使用 bitmap_hash 或 
bitmap_hash64 计算 Hash 值,并返回 Hash 值的 bitmap。
 
-由于数据质量问题或者 Schema Change 
内存使用超出限制导致物化视图创建失败。如果是内存问题,调大`memory_limitation_per_thread_for_schema_change_bytes`参数即可。
 
-:::caution
-注意:to_bitmap 的参数仅支持正整型,如果原始数据中存在负数,会导致物化视图创建失败。String 类型的字段可使用 bitmap_hash 或 
bitmap_hash64 计算 Hash 值,并返回 Hash 值的 bitmap。
-:::
 
 ## 更多帮助
 
-关于物化视图使用的更多详细语法及最佳实践,请参阅 [CREATE MATERIALIZED 
VIEW](../../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW)
 和 [DROP MATERIALIZED 
VIEW](../../sql-manual/sql-statements/Data-Definition-Statements/Drop/DROP-MATERIALIZED-VIEW)
 命令手册,你也可以在 MySQL 客户端命令行下输入 `HELP CREATE MATERIALIZED VIEW` 和`HELP DROP 
MATERIALIZED VIEW`  获取更多帮助信息。
+关于物化视图使用的更多详细语法及最佳实践,请参阅 [CREATE MATERIALIZED 
VIEW](../sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW.md)
 和 [DROP MATERIALIZED 
VIEW](../sql-manual/sql-reference/Data-Definition-Statements/Drop/DROP-MATERIALIZED-VIEW.md)
 命令手册,你也可以在 MySQL 客户端命令行下输入 `HELP CREATE MATERIALIZED VIEW` 和`HELP DROP 
MATERIALIZED VIEW`  获取更多帮助信息。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.2/query-acceleration/materialized-view.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.2/query-acceleration/materialized-view.md
index 235b6e1a23b..8008a6c2496 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.2/query-acceleration/materialized-view.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-1.2/query-acceleration/materialized-view.md
@@ -523,7 +523,7 @@ select year(k4)+month(k4)+day(k4) from d_table where 
year(k4) = 2020; // 命中k
 ## 局限性
 
 1. 物化视图的聚合函数的参数不支持表达式仅支持单列,比如:sum(a+b) 不支持。(2.0 后支持)
-2. 如果删除语句的条件列,在物化视图中不存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
+2. 如果删除语句的条件列,在物化视图中存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
 3. 单表上过多的物化视图会影响导入的效率:导入数据时,物化视图和 base 表数据是同步更新的,如果一张表的物化视图表超过 10 
张,则有可能导致导入速度很慢。这就像单次导入需要同时导入 10 张表数据是一样的。
 4. 相同列,不同聚合函数,不能同时出现在一张物化视图中,比如:select sum(a), min(a) from table 不支持。(2.0 后支持)
 5. 物化视图针对 Unique Key 数据模型,只能改变列顺序,不能起到聚合的作用,所以在 Unique Key 
模型上不能通过创建物化视图的方式对数据进行粗粒度聚合操作
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/view-materialized-view/materialized-view.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/view-materialized-view/materialized-view.md
index 184f29c011e..b23ef2a7a3f 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/view-materialized-view/materialized-view.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/view-materialized-view/materialized-view.md
@@ -548,7 +548,7 @@ select year(k4)+month(k4) from d_table where year(k4) = 
2020; // 命中kymd
 
 ## 局限性
 
-1. 如果删除语句的条件列,在物化视图中不存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
+1. 如果删除语句的条件列,在物化视图中存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
 
 2. 单表上过多的物化视图会影响导入的效率:导入数据时,物化视图和 Base 表数据是同步更新的,如果一张表的物化视图表超过 10 
张,则有可能导致导入速度很慢。这就像单次导入需要同时导入 10 张表数据是一样的。
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query/view-materialized-view/materialized-view.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query/view-materialized-view/materialized-view.md
index 194946e9749..86e2de360aa 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query/view-materialized-view/materialized-view.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query/view-materialized-view/materialized-view.md
@@ -552,7 +552,7 @@ MySQL [test]> desc advertiser_view_record;
 
 ## 局限性
 
-1. 如果删除语句的条件列,在物化视图中不存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
+1. 如果删除语句的条件列,在物化视图中存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
 
 2. 单表上过多的物化视图会影响导入的效率:导入数据时,物化视图和 Base 表数据是同步更新的,如果一张表的物化视图表超过 10 
张,则有可能导致导入速度很慢。这就像单次导入需要同时导入 10 张表数据是一样的。
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query/view-materialized-view/materialized-view.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query/view-materialized-view/materialized-view.md
index c02fab6a110..8a0ad6c32d5 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query/view-materialized-view/materialized-view.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query/view-materialized-view/materialized-view.md
@@ -572,7 +572,7 @@ select year(k4)+month(k4) from d_table where year(k4) = 
2020; // 命中kymd
 
 ## 局限性
 
-1. 如果删除语句的条件列,在物化视图中不存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
+1. 如果删除语句的条件列,在物化视图中存在,则不能进行删除操作。如果一定要删除数据,则需要先将物化视图删除,然后方可删除数据。
 
 2. 单表上过多的物化视图会影响导入的效率:导入数据时,物化视图和 Base 表数据是同步更新的,如果一张表的物化视图表超过 10 
张,则有可能导致导入速度很慢。这就像单次导入需要同时导入 10 张表数据是一样的。
 
diff --git a/versioned_docs/version-1.2/query-acceleration/materialized-view.md 
b/versioned_docs/version-1.2/query-acceleration/materialized-view.md
index b4d50cd2a0d..2be07d7e97d 100644
--- a/versioned_docs/version-1.2/query-acceleration/materialized-view.md
+++ b/versioned_docs/version-1.2/query-acceleration/materialized-view.md
@@ -525,7 +525,7 @@ In `Doris 2.0`, we have made some enhancements to the 
expressions supported by t
 ## Limitations
 
 1. The parameter of the aggregate function of the materialized view does not 
support the expression only supports a single column, for example: sum(a+b) 
does not support. (Supported after 2.0)
-2. If the conditional column of the delete statement does not exist in the 
materialized view, the delete operation cannot be performed. If you must delete 
data, you need to delete the materialized view before deleting the data.
+2. If the conditional column of the delete statement exists in the 
materialized view, the delete operation cannot be performed. If you must delete 
data, you need to delete the materialized view before deleting the data.
 3. Too many materialized views on a single table will affect the efficiency of 
importing: When importing data, the materialized view and base table data are 
updated synchronously. If a table has more than 10 materialized view tables, it 
may cause the import speed to be very high. slow. This is the same as a single 
import needs to import 10 tables at the same time.
 4. The same column with different aggregate functions cannot appear in a 
materialized view at the same time. For example, select sum(a), min(a) from 
table are not supported. (Supported after 2.0)
 5. For the Unique Key data model, the materialized view can only change the 
column order and cannot play the role of aggregation. Therefore, in the Unique 
Key model, it is not possible to perform coarse-grained aggregation operations 
on the data by creating a materialized view.
diff --git 
a/versioned_docs/version-2.0/query/view-materialized-view/materialized-view.md 
b/versioned_docs/version-2.0/query/view-materialized-view/materialized-view.md
index 9b68be1af6e..c81bb8e67e6 100644
--- 
a/versioned_docs/version-2.0/query/view-materialized-view/materialized-view.md
+++ 
b/versioned_docs/version-2.0/query/view-materialized-view/materialized-view.md
@@ -527,7 +527,7 @@ In `Doris 2.0`, we have made some enhancements to the 
expressions supported by t
 
 ## Limitations
 
-1. If the condition column of the delete statement does not exist in the 
materialized view, the delete operation cannot be performed. If you must delete 
the data, you need to delete the materialized view before deleting the data.
+1. If the condition column of the delete statement exists in the materialized 
view, the delete operation cannot be performed. If you must delete the data, 
you need to delete the materialized view before deleting the data.
 2. Too many materialized views on a single table will affect the efficiency of 
import: when importing data, the materialized view and Base table data are 
updated synchronously. If a table has more than 10 materialized views, the 
import speed may be slow. slow. This is the same as if a single import needs to 
import 10 table data at the same time.
 3. For the Unique Key data model, the materialized view can only change the 
order of the columns and cannot perform aggregation. Therefore, it is not 
possible to perform coarse-grained aggregation operations on the data by 
creating a materialized view on the Unique Key model.
 4. At present, the rewriting behavior of some optimizers to SQL may cause the 
materialized view to fail to be hit. For example, k1+1-1 is rewritten as k1, 
between is rewritten as <= and >=, and day is rewritten as dayofmonth. In this 
case, you need to manually adjust the statements of the query and materialized 
view.
diff --git 
a/versioned_docs/version-2.1/query/view-materialized-view/materialized-view.md 
b/versioned_docs/version-2.1/query/view-materialized-view/materialized-view.md
index 4809e3a2370..4f66fc2db69 100644
--- 
a/versioned_docs/version-2.1/query/view-materialized-view/materialized-view.md
+++ 
b/versioned_docs/version-2.1/query/view-materialized-view/materialized-view.md
@@ -532,7 +532,7 @@ In `Doris 2.0`, we have made some enhancements to the 
expressions supported by t
 
 ## Limitations
 
-1. If the condition column of the delete statement does not exist in the 
materialized view, the delete operation cannot be performed. If you must delete 
the data, you need to delete the materialized view before deleting the data.
+1. If the condition column of the delete statement exists in the materialized 
view, the delete operation cannot be performed. If you must delete the data, 
you need to delete the materialized view before deleting the data.
 2. Too many materialized views on a single table will affect the efficiency of 
import: when importing data, the materialized view and Base table data are 
updated synchronously. If a table has more than 10 materialized views, the 
import speed may be slow. slow. This is the same as if a single import needs to 
import 10 table data at the same time.
 3. For the Unique Key data model, the materialized view can only change the 
order of the columns and cannot perform aggregation. Therefore, it is not 
possible to perform coarse-grained aggregation operations on the data by 
creating a materialized view on the Unique Key model.
 4. At present, the rewriting behavior of some optimizers to SQL may cause the 
materialized view to fail to be hit. For example, k1+1-1 is rewritten as k1, 
between is rewritten as <= and >=, and day is rewritten as dayofmonth. In this 
case, you need to manually adjust the statements of the query and materialized 
view.
diff --git 
a/versioned_docs/version-3.0/query/view-materialized-view/materialized-view.md 
b/versioned_docs/version-3.0/query/view-materialized-view/materialized-view.md
index 832b72af208..e0d0943cd91 100644
--- 
a/versioned_docs/version-3.0/query/view-materialized-view/materialized-view.md
+++ 
b/versioned_docs/version-3.0/query/view-materialized-view/materialized-view.md
@@ -524,7 +524,7 @@ In `Doris 2.0`, we have made some enhancements to the 
expressions supported by t
 
 ## Limitations
 
-1. If the condition column of the delete statement does not exist in the 
materialized view, the delete operation cannot be performed. If you must delete 
the data, you need to delete the materialized view before deleting the data.
+1. If the condition column of the delete statement exists in the materialized 
view, the delete operation cannot be performed. If you must delete the data, 
you need to delete the materialized view before deleting the data.
 2. Too many materialized views on a single table will affect the efficiency of 
import: when importing data, the materialized view and Base table data are 
updated synchronously. If a table has more than 10 materialized views, the 
import speed may be slow. slow. This is the same as if a single import needs to 
import 10 table data at the same time.
 3. For the Unique Key data model, the materialized view can only change the 
order of the columns and cannot perform aggregation. Therefore, it is not 
possible to perform coarse-grained aggregation operations on the data by 
creating a materialized view on the Unique Key model.
 4. At present, the rewriting behavior of some optimizers to SQL may cause the 
materialized view to fail to be hit. For example, k1+1-1 is rewritten as k1, 
between is rewritten as <= and >=, and day is rewritten as dayofmonth. In this 
case, you need to manually adjust the statements of the query and materialized 
view.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to