how to optimize this mysql query - %a% or : SELECT DISTINCT u.id AS userId,u.type AS userType FROM User AS u,Personal AS p,Company AS c WHERE (p.realName LIKE
'%adf%' AND u.type=1 AND u.id=p.userId) OR (c.name LIKE
'%grge%' AND u.id=c.userId) LIMIT 0 , 10000