title: Mysql in a faster way?
body: <p>I have a table in MySQL database:</p>
  
  <pre><code>  CodeNo Block
     a1     a
     a2     a
     b1     b
     b2     b
     c1     c
     c2     c 
  </code></pre>
  
  <p>I can query by using one of the two alternatives:</p>
  
  <pre><code>select codeno from mytab where block='b' and codeno like 'b%'
  </code></pre>
  
  <p>alternatively</p>
  
  <pre><code>select codeno from mytab where codeno like 'b%'
  </code></pre>
  
  <p>Which one is faster in an actual scenario when there are millions of records in mytab? Also could anyone explain the way it is actually stored in the database?</p>