So here is the scenario:
- MySQL
- have 1 MYISAM Table
- colum named v.value has a full text index
Basic query works fine, uses the index as expected:
SELECT p.online_identifier
FROM (...)
WHERE r.area_id = 3 AND s.state_id= 4
AND (snap.area_has_catalogues_attributes_id = 7028
AND MATCH (v.value) AGAINST('+SomeBrand' IN BOOLEAN MODE))
Now when I add an OR, the full text search index (on v.value) is not used. I run Explain to verify it.
The query would look something like this:
(...)
WHERE r.area_id = 3 AND s.state_id= 4 AND
(snap.area_has_catalogues_attributes_id = 7028 AND MATCH (v.value) AGAINST('+SomeBrand' IN BOOLEAN MODE))
OR (snap.area_has_catalogues_attributes_id = 7045 AND MATCH (v.value) AGAINST('+OtherBrand' IN BOOLEAN MODE))
I dont understand why. Any ideas?