Bug #4464 full text index search speed differs between count queries of the same type
| Submitted: | 8 Jul 2004 15:11 | Modified: | 9 Mar 2005 13:15 |
|---|---|---|---|
| Reporter: | Karsten Wenger | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: FULLTEXT search | Severity: | S4 (Feature request) |
| Version: | 4.1.1-alpha-max-log | OS: | Linux (linux) |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.037 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: The following 2 queries on the full text index seem to depend on the cardinality of the search item. Since the cardinality should be known and remembered after indexing, the simple count statements should take the same amount of time. mysql> select count(*) from sentences WHERE MATCH (sentence) AGAINST ('apop'); +----------+ | count(*) | +----------+ | 21 | +----------+ 1 row in set (0.06 sec) mysql> select count(*) from sentences WHERE MATCH (sentence) AGAINST ('endometriosis'); +----------+ | count(*) | +----------+ | 14711 | +----------+ 1 row in set (35.10 sec) How to repeat: Make a DB with full text index and look for token of different frequency like the two above. Suggested fix: Determine and use the cardinality of each token known after indexing.