Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/zh-CN/getting-started/data-model-rollup.md
Original file line number Diff line number Diff line change
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