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

【已解决】where查询时只用排序字段中某几个字段,前缀索引还会生效吗

Asked May 9, 2024 Modified May 10, 2024
Viewed 73
query 2.0

Doris设置排序列时指定了多个字段,但是where查询时只用了某几个字段,此时前缀索引会生效吗?
比如排序字段是:userid,name,pv,uv
下面哪种查询前缀索引会生效
1、where userid = '' and name = '' and pv = '' and uv = ''
2、where userid = '' and name = ''
3、where userid = ''
4、where name = ''
5、where name = '' and pv = ''

edited May 10, 2024
changguowei199
asked May 9, 2024
1 Answers

会生效的,还会加速的,可以参考官网文档看下:排序键与前缀索引

edited May 10, 2024
徐振超@SelectDB(可以直接加微信Faith_xzc)8271
answered May 10, 2024
Related Questions
Doris 2.0.15,3FE、6BE(3BE mix角色 3BE computation角色)3个mix角色的BE节点CPU使用率100%
1 answers
在select 子语句中使用标量子查询执行查询正常,创建为视图执行报错
get_json_string/json_extract 在不同的Doris版本中结果不一致
1 answers
Doris4.0.2版本,集群部署模式3台主机,不稳定,经常报错。insert报failed to write enough replicas 0/1 for tablet,select查询也报错
1 answers
倒排索引match返回结果不正确
1 answers
Doris无法查询information_schema.tables表信息
1 answers

Terms of service Privacy policy

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