[MDEV-10059] Compute window functions with same sorting criteria simultaneously Created: 2016-05-12 Updated: 2016-09-14 Resolved: 2016-09-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Fix Version/s: | 10.2.2 |
| Type: | Task | Priority: | Major |
| Reporter: | Vicențiu Ciorbaru | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 10.2.1-3, 10.2.1-4, 10.2.1-5, 10.2.2-1, 10.2.2-1, 10.2.2-2, 10.2.2-1, 10.2.2-2, 10.2.2-3 |
| Description |
|
While computing window functions, we can take advantage of the general use case where they specify the same PARTITION and ORDER BY criteria. In order to do this, we must refactor the computation code to be aware of multiple functions during a scan. |
| Comments |
| Comment by Vicențiu Ciorbaru [ 2016-09-06 ] |
|
While refactoring code for this issue, I have reduced the algorithms that we have for computing window functions to only one. Stream-able functions such as RANK and ROW_NUMBER are now computed by making use of cursors, instead of a specific construct just for them. Performance wise they behave the same as before. |
| Comment by Vicențiu Ciorbaru [ 2016-09-13 ] |
|
Implemented with: https://github.com/MariaDB/server/commit/23e8b508a00a23653da436519371943487ad6fe4 |