-
Notifications
You must be signed in to change notification settings - Fork 312
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
improve performance of count_data #728
Conversation
@neverchanje @levy5307 |
@ZhongChaoqiang This is good idea. we have discussed it and think that:
|
I aggree with @shuo-jia. Besides count data precisely is not a common used scenario. Count estimates is enough in most cases |
@shuo-jia @levy5307 |
Yes, I think it's good to open a new pull request to add another new rpc. @ZhongChaoqiang |
@levy5307 @shuo-jia |
对于重复的代码,可以考虑抽出来以复用,这样是否可以?@ZhongChaoqiang |
主要还不是代码的问题。由于我们多个scan的接口都有用到,例如get_scanner/async_get_scanner/get_unordered_scanners/async_get_unordered_scanners,如果count功能不走scan这条路线的话,就可能要新增多个count的接口,以对应原来的scan的功能了,因为count接口的查询条件要和scan接口的保持一致。感觉是不是更复杂了?@shuo-jia |
不太明白,scan一个rpc,count一个rpc,count和scan共用一套"迭代器",scan的client接口完全可以保持不变;只需要添加count的api不就行了? |
@ZhongChaoqiang 你好,这项工作可以继续吗?我们的使用场景中对这个功能也有比较强烈的需求 |
共用rpc我觉得倒没有问题。问题点应该在count数值应该放在哪里,序列化在 |
Has been implemented by #1091, so I close it. |
What problem does this PR solve?
When we precisely count data for a large table, it will cost minutes or hours.
What is changed and how does it work?
Actually,we just need the count of data.So we just need transfer the count of data from server to client, but not the detailed data.
In our test, it will 10x faster than before.
Tests
Related changes