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

[CH]Optimize and filter conditions by move equals ahead #8516

Open
KevinyhZou opened this issue Jan 13, 2025 · 0 comments · May be fixed by #8517
Open

[CH]Optimize and filter conditions by move equals ahead #8516

KevinyhZou opened this issue Jan 13, 2025 · 0 comments · May be fixed by #8517
Labels
enhancement New feature or request

Comments

@KevinyhZou
Copy link
Contributor

KevinyhZou commented Jan 13, 2025

Description

when do query contains multiple and conditions in where , just like select count(1) from test_tbl where cast(b as string) != '' and a = 1, we can simply move the equals conditions ahead to improve the performance, the sql can be executed as select count(1) from test_tbl where a = 1 and cast(b as string) != '', below it is the performance comparsion of the two sql

image

image

@KevinyhZou KevinyhZou added the enhancement New feature or request label Jan 13, 2025
@KevinyhZou KevinyhZou changed the title Optimize and filter conditions by move equals ahead [CH]Optimize and filter conditions by move equals ahead Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant