WL#2572: avoid unnecessary row reads in Full-Text Search
Affects: Server-7.1 — Status: Un-Assigned — Priority: Medium
Example: in SELECT COUNT(*) WHERE MATCH ... MySQL can avoid reading data rows, and immediately return the number of found documents. (and it can skip qsort by relevance too)
the main idea is to set the bitmap of used fields correctly - it means fields mentioned in MATCH should NOT be added to the bitmap, unless the search does not use the index. Note - it is entirely possible to get empty bitmap (all fields are unused) for a non-trivial query. One needs to verify that MySQL behaves correctly in this case - skips row reads completely. For SELECT COUNT(*) we should try to skip qsort() in NL mode - the third argument of the init_ftfuncs() should take this into accound.
Copyright (c) 2000, 2016, Oracle Corporation and/or its affiliates. All rights reserved.