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

Optimizer support for Multi-Valued indexes: support new Full Text Search

    XMLWordPrintable

Details

    Description

      Splitting this off from MDEV-38306.

      The code in MDEV-25848 will reimplement Fulltext and Vector as Multi-Value indexes. It will handle index maintenance and provide an API for index access, as well as for estimating the cost of reading an index.

      This task is about hooking it to SQL.

      Current draft of Multi-Valued Index API looks like this:

      class hlindex : public Sql_alloc
      {
      public:
        hlindex(TABLE *t) : table(t) { }
       
        virtual int insert_row(TABLE *tbl, KEY *keyinfo) = 0;
        // This takes the condition and initializes a scan to read the records:
        virtual int read_init(TABLE *tbl, KEY *keyinfo, Item *dist, ulonglong limit) = 0;
        virtual int read_next(TABLE *tbl) = 0;
        virtual int read_end(TABLE *tbl) = 0;
        virtual int delete_row(TABLE *tbl, const uchar *rec, KEY *keyinfo) = 0;
        virtual int delete_all(TABLE *tbl, KEY *keyinfo, bool truncate) = 0;
        virtual bool reading() = 0;
        virtual ~hlindex();
       
        TABLE *table;
      }
      

      also cost function will be added:

      virtual cost_of_read(TABLE *tbl, KEY *keyinfo, Item *dist, ulonglong limit, COST *cost, ha_rows *rows) = 0;
      

      This MDEV is about hooking these into Query Optimizer/ Executor.

      TODO: functions accept Item *dist but the hl index will actually need a way to get the values from the item?

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 5d Original Estimate - 5d
                  5d
                  Remaining:
                  Remaining Estimate - 4d 7h 56m
                  4d 7h 56m
                  Logged:
                  Remaining Estimate - 4d 7h 56m
                  19m

                  Git Integration

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