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

Optimize count(*) logic #167

Closed
Novemser opened this issue Dec 27, 2017 · 4 comments
Closed

Optimize count(*) logic #167

Novemser opened this issue Dec 27, 2017 · 4 comments

Comments

@Novemser
Copy link
Contributor

It is said from TiDB that certain optimization of push down columns could result in some performance improvement.

See pingcap/tidb#5447

@birdstorm
Copy link
Contributor

keep in mind that count() acts differently in mysql and spark.

@Novemser
Copy link
Contributor Author

@birdstorm Shall you describe the differences here in details? Thanks.

@birdstorm
Copy link
Contributor

birdstorm commented Dec 27, 2017

@Novemser if you use count() in spark, the result is 0. It is different from count(*).

so you must be careful if you want to apply their logic directly.

@birdstorm
Copy link
Contributor

birdstorm commented Dec 27, 2017

@Novemser It seems that TiKV has now supported setting key_only flag in coprocessor/scanner since pingcap/tikv#2580, maybe we can take advantage of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants