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

MATCH...AGAINST is always estimated to return 1 row

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Confirmed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
    • Fix Version/s: 10.0, 10.1, 10.2, 10.3, 10.4
    • Component/s: Optimizer
    • Labels:
      None

      Description

      When the optimizer looks for a best execution plan, it needs to know how many rows a particular condition can match. For historical reasons a full-text search query that uses a full-text index is always assumed to return 1 row.

      This works best for natural-language queries in MyISAM (where MATCH processing happens before the join and does not depend on the join plan, so using full-text index for joins is kind of free, does not add any cost at all).

      But this might be not true for boolean search in MyISAM or any searches in other engines.

      MariaDB needs to ask the engine to provide full-text search estimates instead of using hard-coded rules.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                serg Sergei Golubchik
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: