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

Add support for Indexes on Expressions

    XMLWordPrintable

Details

    Description

      An index on expression means something like

      CREATE TABLE t1 (a int, b int, INDEX (a/2+b));
      ...
      SELECT * FROM t1 WHERE a/2+b=100;

      in this case the optimizer should be able to use an index.

      This task naturally splits in two steps:

      1. add expression matching into the optimizer, use it for generated columns. Like in
        CREATE TABLE t1 (a int, b int, c INT GENERATED ALWAYS AS (a/2+b), INDEX (c));
      2. support the syntax to create an index on expression directly, this will automatically create a hidden generated column under the hood

      original task description is visible in the history

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              fale Fabio Alessandro Locati
              Votes:
              20 Vote for this issue
              Watchers:
              28 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.