-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 the performance of WindowExec
by using sliding window or segment tree
#12967
Comments
/pick-up-challenge |
@mmyj don't have enough score, pick up failed |
/pick-up-challenge |
@mmyj pick up issue success |
…gment tree pingcap#12967 add aggFunc count benchmark case
…gment tree pingcap#12967 add window frame
…gment tree pingcap#12967 gen test data
…gment tree pingcap#12967 temp save
…w or segment tree pingcap#12967 just improve slide window of countOriginal4Int
…w or segment tree pingcap#12967 add benchmark
…w or segment tree pingcap#12967 add comment
…w or segment tree pingcap#12967 ont use interface
…w or segment tree pingcap#12967 fix EvalReal
…w or segment tree pingcap#12967 optimize windowFunc.(aggfuncs.SlidingWindowAggFunc)
WindowExec
by using sliding window or segment treeWindowExec
by using sliding window or segment tree
/pick-up avg |
Pick up success. |
hi, the slide window interface of the avg aggFunc had been implemented.@vagetablechicken |
@SunRunAway please update the todo list, I had been compelated the avg and the xor. |
/pick-up |
This issue already picked by vagetablechicken. |
/pick-up |
This issue already picked by vagetablechicken. |
/give-up ok, give up this issue |
Give up success. |
Maybe individual issue should be created for each item. Otherwise the issues could not be picked up. |
/pick-up |
Pick up success. |
@TszKitLo40 |
It seems all issues of this sliding window optimization have been completed 🎊 ! |
This comment has been minimized.
This comment has been minimized.
for |
I want to implement this. But it seems that I need more background knowledge of this issue. |
Thanks for the quick reply, but I am currently refactoring the window funcion framework, which is about to be changed fundamentally, so I would suggest you to implement this later (after my refactorization). I'll keep you informed for the process of the refactoring, and I'll let you know about the new design doc once it is ready to release. Please expect to work on this after 3.12, which is the deadline the refactoring should be done. Does this sounds good to you? |
ok, I will wait for your further response. |
Description
TiDB implements window function feature compatible with MySQL (https://dev.mysql.com/doc/refman/8.0/en/window-functions.html). The performance has much space to improve.
Considering implementing an algorithm of sliding window or segment tree within the different frames of the same window partition, when doing the aggregate calculation step.
And here’s a paper to read http://www.vldb.org/pvldb/vol8/p1058-leis.pdf for reference, describing and comparing some effective implementations. A paper reading video (in Chinese) is here(https://www.bilibili.com/video/av70860233). Due to this paper, we have a chance to make a SQL like
select sum(a) over (order by b rows between ? preceding and current row) from r;
600% faster.Goals:
Score
Mentor(s)
Recommended Skills
PRs
Framework: #14294
WindowExec
by using sliding window #14294 along with the framworkaggFuncSum
by using sliding window #14887aggFuncAvg
by using sliding window #15606aggFuncBitXor
by using sliding window #16091The text was updated successfully, but these errors were encountered: