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

结果集归并的时候可以采用堆排序来提升性能 #161

Closed
starmarine opened this issue Oct 26, 2016 · 1 comment
Closed

结果集归并的时候可以采用堆排序来提升性能 #161

starmarine opened this issue Oct 26, 2016 · 1 comment

Comments

@starmarine
Copy link

参考源码StreamingOrderByReducerResultSet.java
假如有10库,每库100表,取50个结果
如果采用遍历就是每次遍历1000个resultset,50个结果就是50000次
使用堆排序的话初始化时n_logn = 10000
剩下的50次就是50_logn = 500
总共10500次,还是有不小的性能提升

@terrymanu
Copy link
Member

duplicate with #215

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

2 participants