title: mysql LIKE query takes too long
body: <p>SQL : </p>
  
  <pre><code>        SELECT
              COUNT(usr.id) as `total_results`
          FROM
              users as usr
              LEFT JOIN profile as prof
                  ON prof.uid = usr.uid
          WHERE
              usr.username LIKE '%a%'
              OR
              prof.name LIKE '%a%' 
  </code></pre>
  
  <p>Indexes on users:</p>
  
  <pre><code>uid - uid
  username - username
  </code></pre>
  
  <p>Indexes on profile</p>
  
  <pre><code>index1 - uid
  index2 - uid,name
  index3 - name
  </code></pre>
  
  <p>EXPLAIN : </p>
  
  <pre><code>id  select_type     table   type    possible_keys   key     key_len     ref     rows    Extra
  1   PRIMARY     usr     ALL     NULL    NULL    NULL    NULL    18387   
  1   PRIMARY     prof    ref     index2,index1   index2  8   site.usr.uid    1   Using where
  2   DEPENDENT SUBQUERY  sub     ref     i3,index1,index2    i3  16  site.usr.uid,const  1   Using index
  </code></pre>
  
  <p>the above query takes about 0.1221</p>
  
  <p>how can i make it run faster?</p>