I've got quite a slow query, that I need to get a random record from, however this is proving painfully slow, can anyobdy suggest ways to speed up the following query.
SELECT * FROM people WHERE names like "%bert%" or names like "%john smith%".......... or names like "%eric%" ORDER BY RAND() LIMIT 0,1
bear in mind their could be 50+ names in the list hence the ............
The query does infact work, but is that slow that the PHP code that runs it times out waiting for the answer.