Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] add prefix index description #1459

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/table-design/index/prefix-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Since the KEY definition of a table is unique, a table can only have one type of

## Syntax

There is no specific syntax for defining a prefix index. When creating a table, the first 36 bytes of the table's KEY are automatically taken as the prefix index.
There is no specific syntax for defining a prefix index. When creating a table, the first 36 bytes of the table's KEY are automatically taken as the prefix index. If the prefix index encounters a varchar field, it automatically truncates the first 20 bytes.

## Example Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Apache Doris 的数据存储在类似 SSTable(Sorted String Table)的数据

## 使用语法

前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。
前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。如果前缀索引碰见varchar类型的字段,会自动截断前20个字节。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。如果前缀索引碰见 Varchar 类型的字段,会自动截断前 20 个字节。

  1. 请过大模型,碰见属于口语化表达。
  2. 中英文之间建议 英文首字母大写,中英文、中文与数字之间建议添加空格

以下是大模型优化后结果:
前缀索引无需专门语法定义,在创建表时,系统会自动将表的主键(Key)的前 36 个字节作为前缀索引。若前缀索引涉及 Varchar 类型的字段,则系统会自动截取该字段的前 20 个字节。



## 使用示例
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Apache Doris 的数据存储在类似 SSTable(Sorted String Table)的数据

## 使用语法

前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。
前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。如果前缀索引碰见varchar类型的字段,会自动截断前20个字节。


## 使用示例
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Apache Doris 的数据存储在类似 SSTable(Sorted String Table)的数据

## 使用语法

前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。
前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。如果前缀索引碰见varchar类型的字段,会自动截断前20个字节。


## 使用示例
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Apache Doris 的数据存储在类似 SSTable(Sorted String Table)的数据

## 使用语法

前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。
前缀索引没有专门的语法去定义,建表时自动取表的 Key 的前 36 字节作为前缀索引。如果前缀索引碰见varchar类型的字段,会自动截断前20个字节。


## 使用示例
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Since the KEY definition of a table is unique, a table can only have one type of

## Syntax

There is no specific syntax for defining a prefix index. When creating a table, the first 36 bytes of the table's KEY are automatically taken as the prefix index.
There is no specific syntax for defining a prefix index. When creating a table, the first 36 bytes of the table's KEY are automatically taken as the prefix index. If the prefix index encounters a varchar field, it automatically truncates the first 20 bytes.

## Example Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Since the KEY definition of a table is unique, a table can only have one type of

## Syntax

There is no specific syntax for defining a prefix index. When creating a table, the first 36 bytes of the table's KEY are automatically taken as the prefix index.
There is no specific syntax for defining a prefix index. When creating a table, the first 36 bytes of the table's KEY are automatically taken as the prefix index. If the prefix index encounters a varchar field, it automatically truncates the first 20 bytes.

## Example Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Since the KEY definition of a table is unique, a table can only have one type of

## Syntax

There is no specific syntax for defining a prefix index. When creating a table, the first 36 bytes of the table's KEY are automatically taken as the prefix index.
There is no specific syntax for defining a prefix index. When creating a table, the first 36 bytes of the table's KEY are automatically taken as the prefix index. If the prefix index encounters a varchar field, it automatically truncates the first 20 bytes.

## Example Usage

Expand Down