Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10059

Compute window functions with same sorting criteria simultaneously

Details

    • 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.
      We already take advantage of this fact by only sorting the internal tmp table as few times as possible. Filling the window function values within the internal tmp table can be performed during one pass / sort as well. Currently we do a pass for each window function.

      In order to do this, we must refactor the computation code to be aware of multiple functions during a scan.

      Attachments

        Activity

          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.

          cvicentiu Vicențiu Ciorbaru added a comment - 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.
          cvicentiu Vicențiu Ciorbaru added a comment - Implemented with: https://github.com/MariaDB/server/commit/23e8b508a00a23653da436519371943487ad6fe4

          People

            cvicentiu Vicențiu Ciorbaru
            cvicentiu Vicențiu Ciorbaru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.