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

Support DESC indexes in loose scan optimization

Details

    Description

      Group-min-max (aka Loose Scan) optimization does not work for reverse-ordered indexes:

      looking in opt_range.cc one can see in get_best_group_min_max() :

            for (uint i= 0; i < table->actual_n_key_parts(cur_index_info); i++)
            {
              if (cur_index_info->key_part[i].key_part_flag & HA_REVERSE_SORT)
              {
                cause="Reverse-ordered (not supported yet)";
                goto next_index;
              }
            }
      

      This task is to support it.

      Attachments

        Issue Links

          Activity

            ycp Yuchen Pei added a comment - Hi psergei , ptal thanks: https://github.com/MariaDB/server/pull/3872

            Review input provided. One item left to address..

            psergei Sergei Petrunia added a comment - Review input provided. One item left to address..
            ycp Yuchen Pei added a comment -

            Thanks for the review psergei. I've updated my patch accordingly.

            Hi lstartseva, ptal thanks:

            0d710fb6dc9 bb-12.0-mdev-32732 MDEV-32732 Support DESC indexes in loose scan optimization
            

            ycp Yuchen Pei added a comment - Thanks for the review psergei . I've updated my patch accordingly. Hi lstartseva , ptal thanks: 0d710fb6dc9 bb-12.0-mdev-32732 MDEV-32732 Support DESC indexes in loose scan optimization

            Testing done, Ok to push
            But before pushing, ycp, plz, change the description for testcase in desc_index_range.test

            --echo #
            --echo # Check that "Using index for group-by" is disabled (it's not supported, yet)
            --echo #
            

            lstartseva Lena Startseva added a comment - Testing done, Ok to push But before pushing, ycp , plz, change the description for testcase in desc_index_range.test --echo # --echo # Check that "Using index for group-by" is disabled (it's not supported, yet) --echo #
            ycp Yuchen Pei added a comment -

            Thanks for the testing. Push blocked by failure of main.timezone (see bb-12.0-mdev-32732 2769cce834bda986096423ac3d5899dbf1d81e27) which I believe requires a merge of 11.8->main which is blocked by some galera failures see https://mariadb.slack.com/archives/C03ER9QC3/p1744098547234689

            ycp Yuchen Pei added a comment - Thanks for the testing. Push blocked by failure of main.timezone (see bb-12.0-mdev-32732 2769cce834bda986096423ac3d5899dbf1d81e27) which I believe requires a merge of 11.8->main which is blocked by some galera failures see https://mariadb.slack.com/archives/C03ER9QC3/p1744098547234689

            People

              ycp Yuchen Pei
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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