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

关于前缀索引字符串截断问题 #45692

Open
hungrytortoise opened this issue May 15, 2024 · 1 comment
Open

关于前缀索引字符串截断问题 #45692

hungrytortoise opened this issue May 15, 2024 · 1 comment
Labels
type/bug Something isn't working

Comments

@hungrytortoise
Copy link

Steps to reproduce the behavior (Required)

1、建表语句
CREATE TABLE short_key_test (
user_id string NOT NULL COMMENT "",
app varchar(65533) NOT NULL COMMENT "",
acct_no varchar(65533) NOT NULL COMMENT ""
)
ENGINE = OLAP
PRIMARY KEY(user_id,app,acct_no)
DISTRIBUTED BY HASH(acct_no)
order by (app,user_id).'

explain analyze select * from ads.short_key_test where app='ccc' and user_id='123';

Expected behavior (Required)

按照文档描述,创建前缀索引会被第一个字符串截断。所以生效的只有app的前缀索引
image

Real behavior (Required)

实际查看profile 前缀索引过滤掉了只剩一行记录,即user_id 也生效了

StarRocks version (Required)

-3.1.7

@hungrytortoise hungrytortoise added the type/bug Something isn't working label May 15, 2024
@hungrytortoise
Copy link
Author

一共:1038808 记录;
profile中查看过滤掉 1038807
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant