I don't claim to be an expert on the subject, but when faced with a query like this:
SELECT field
FROM table
WHERE (field LIKE '%A%') OR (field LIKE '%B%')
I find I get much better performance if I do this...
SELECT field
FROM table
WHERE (field LIKE '%A%')
UNION
SELECT field
FROM table
WHERE (field LIKE '%B%')
INTERSECT and EXCEPT can also be used, along with the judicious application of parentheses, to get the results you desire. It's worked quite well for me on a number of occasions, though I've never tried it with huge data sets.
ron
-----
a haiku...
NULL is not zero
NULL is not an empty string
NULL is the unknown