Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-5297

add smart rewrite function from "%like%" to "match against"

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Filter

    Description

      1.
      Analyze, if query have conditions, which likely cause a full scan
      like

       tag LIKE '%aaaa%' OR LIKE '%bbbb%' 
      

      2.
      Check, if the column has a full text index.

      If 1. + 2. true rewrite the query to "match against" syntax,

      so

       tag LIKE '%aaaa%' OR LIKE '%bbbb%' 
      

      will be rewritten to

      MATCH(tag) AGAINST('+aaaa','+bbbb'  IN BOOLEAN MODE)
      

      This can improve application, where changing the queries is difficult like snow

      Attachments

        Issue Links

          Activity

            markus makela markus makela added a comment -

            This sounds like a good feature request in the MariaDB server, I'm assuming that the optimizer would be able to know whether the table has a fulltext index and I would imagine that it should be possible for it to decide to use the fulltext index for it instead.

            markus makela markus makela added a comment - This sounds like a good feature request in the MariaDB server, I'm assuming that the optimizer would be able to know whether the table has a fulltext index and I would imagine that it should be possible for it to decide to use the fulltext index for it instead.
            johan.wikman Johan Wikman added a comment -

            Yes, sounds like this is something for the server and not for MaxScale. Rewriting is in general quite tricky, since we do not have a full parser available. MaxScale does not know what indexes are available and making it aware of then would be quite messy.

            johan.wikman Johan Wikman added a comment - Yes, sounds like this is something for the server and not for MaxScale. Rewriting is in general quite tricky, since we do not have a full parser available. MaxScale does not know what indexes are available and making it aware of then would be quite messy.

            People

              maxmether Max Mether
              Richard Richard Stracke
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.