Apache Doris 中文技术论坛
Questions Tags Users Badges

前缀索引char会不会截断?

Asked Jan 26 Modified Jan 1, 0001
Viewed 44
3.0 query

文档说前缀索引在遇到varchar时会截断,那可不可以认为,如果我第一列定义为char(20),第一列就不会被截断,第二列依然可以用于构建前缀索引

edited Jan 1, 0001
1
asked Jan 26
2 Answers

看官方文档是这个说的

edited Jan 1, 1970
____5
answered Jan 26

如果第一列定义为char(20),第一列就不会被截断,第二列依然可以用于构建前缀索引。

如果第一列定义为varchar(20),前缀索引为第一列(20 Bytes)。即使没有达到 36 个字节,因为遇到 VARCHAR,所以直接截断,不再往后继续。

edited Jan 1, 1970
黄海军@SelectDB4963
answered Feb 7
Related Questions
使用阿里云服务器部署Doris,多 BE 共享同一个可供集群外部访问的 IP,碰到 content_type 报错
doris 3.0.3 运行一段时间后建表卡住超时,报错the report queue size exceeds the limit: 100. current: 101
1 answers
k8s部署存算分离3.0.3版本如何指定metaservice、fe、be的时区
各位大佬,目前我司在进行技术选型,目前团队内Doris相关技术经验较少,选择哪个版本更加稳定啊?
1 answers
如何删除resource中的s3.access_key以及s3.secret_key属性
doris村算分离3.0.5版本,表table_properties中storage_vault_id为空,导致自动分区失败,如何更新这个值,现有系统不支持modify。
1 answers

Terms of service Privacy policy

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2025 Apache Doris 中文技术论坛.