[MDEV-7250] MATCH...AGAINST is always estimated to return 1 row Created: 2014-12-02  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Sergei Golubchik Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None

Issue Links:
Blocks
is blocked by MDEV-10698 Extend Storage Engine API to include ... Open

 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.



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2016-07-22 ]

ERP5 has described this problem https://www.erp5.com/P-ERP5-MariaDB.Improvement.Efforts . Look for section "3.1 Mroonga fulltext index cardinality is always 1".

Generated at Thu Feb 08 07:18:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.