From 790e06300da71a4e4533d3e5d52333b4f3d363fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=9B=E6=B6=9B=E5=93=A5?= Date: Thu, 24 Sep 2020 20:53:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E5=AD=97=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.message前20字节截断 2.massage->message --- docs/zh-CN/getting-started/data-model-rollup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh-CN/getting-started/data-model-rollup.md b/docs/zh-CN/getting-started/data-model-rollup.md index 974d8975d57318..f4f6f75b0d057b 100644 --- a/docs/zh-CN/getting-started/data-model-rollup.md +++ b/docs/zh-CN/getting-started/data-model-rollup.md @@ -452,7 +452,7 @@ Doris 会自动命中这个 ROLLUP 表。 我们将一行数据的前 **36 个字节** 作为这行数据的前缀索引。当遇到 VARCHAR 类型时,前缀索引会直接截断。我们举例说明: -1. 以下表结构的前缀索引为 user_id(8Byte) + age(4Bytes) + message(prefix 24 Bytes)。 +1. 以下表结构的前缀索引为 user_id(8Byte) + age(4Bytes) + message(prefix 20 Bytes)。 |ColumnName|Type| |---|---| @@ -508,7 +508,7 @@ Base 表结构如下: 可以看到,ROLLUP 和 Base 表的列完全一样,只是将 user_id 和 age 的顺序调换了。那么当我们进行如下查询时: -`SELECT * FROM table where age=20 and massage LIKE "%error%";` +`SELECT * FROM table where age=20 and message LIKE "%error%";` 会优先选择 ROLLUP 表,因为 ROLLUP 的前缀索引匹配度更高。