Skip to content

Commit

Permalink
[Doc] Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
taotaoge committed Sep 28, 2020
1 parent a202bf8 commit 05512d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/zh-CN/getting-started/data-model-rollup.md
Expand Up @@ -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|
|---|---|
Expand Down Expand Up @@ -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 的前缀索引匹配度更高。

Expand Down

0 comments on commit 05512d7

Please sign in to comment.