-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
After using projection, the same query statement has different values and cannot be hit. #63928
Comments
Hi @liubaochuan, |
CREATE TABLE ds2.CW_SNAP_FEATURE_Face
) |
Hi @liubaochuan,
|
EXPLAIN PIPELINE Result: B: B query is 20 times faster than A query。 |
Wow! x20 sounds interesting. |
EXPLAIN indexes=1 Result: B: |
@konsta-danyliuk |
Hi @liubaochuan.
|
clickhouse version: 23.11.1.2002
A:
sql explain:
explain PLAN select SEQ_ID from ds2.CW_SNAP_FEATURE_Face where SEQ_ID > 10000 order by SEQ_ID asc limit 1;
explain result:
Expression (Projection)
Limit (preliminary LIMIT (without OFFSET))
Sorting (Sorting for ORDER BY)
Expression (Before ORDER BY)
Filter (WHERE)
ReadFromMergeTree (ds2.CW_SNAP_FEATURE_Face)
B:
sql explain:
explain PLAN select SEQ_ID from ds2.CW_SNAP_FEATURE_Face where SEQ_ID > 1000000 order by SEQ_ID asc limit 1;
explain result:
Expression (Projection)
Limit (preliminary LIMIT (without OFFSET))
Sorting (Sorting for ORDER BY)
Filter
ReadFromMergeTree (prj_seq_id_group_id)
Projection:
ALTER TABLE ds2.CW_SNAP_FEATURE_Face
ADD PROJECTION prj_seq_id_group_id
(
SELECT *
ORDER BY SEQ_ID
);
The different values of SEQ_ID cause A to fail to hit the projection。
The text was updated successfully, but these errors were encountered: