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鈥檚 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:
Framework: https://github.com/pingcap/tidb/pull/14294
/pick-up-challenge
@mmyj don't have enough score, pick up failed
Progress 0/400
You may pick up some easy issues first.
/pick-up-challenge
@mmyj pick up issue success
/pick-up
avg
Pick up success.
/pick-up
avg
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
group_concat
This issue already picked by vagetablechicken.
/pick-up
bitxor
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
Thanks for the reminder.
I've updated the progress in the description, this is only one subtask remained which is working in progress. Thus we'll not create new issues for the sub-tasks.
It seems all issues of this sliding window optimization have been completed 馃帄 !
Can we close this issue now? @SunRunAway @mmyj
@mmyj You did not submit PR within 7 days, so give up automatically.
Most helpful comment
It seems all issues of this sliding window optimization have been completed 馃帄 !
Can we close this issue now? @SunRunAway @mmyj