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

Optimizer support for functional indexes: handle duplicate columns

    XMLWordPrintable

Details

    Description

      See MDEV-35615, section Handle Duplicate virtual columns.

      Note: this task will get more important when MDEV-35853 is done.
      Currently, one has to add virtual columns manually before adding and index:

      ALTER TABLE t1
        ADD vcol  $vcol_type AS ($vcol_expr),
        ADD INDEX( .. .vcol ...); 
      

      so, they can as well make sure they do not create multiple virtual columns with the same definition.

      After MDEV-35853, one would be able to just do

       
      ALTER TABLE t1 
        ADD INDEX idx1 ( $expression),
        ADD INDEX idx2 (... $expression ...);
      

      Here, the "default" action is to create two virtual columns for use in idx1 and idx2. Which would prevent one of them from being used. And so, would require this MDEV to be implemented.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.