title: Explain why the result from query on mysql looks like grouped data
body: <p>Can anybody please explain why the result from sql query on mysql looks like grouped data if its where clause was contain or operator? </p>
  
  <p>i hope the following example will help you to understand my question:
  lets assume we have table called mytable with two columns (col1,col2) contains the following data:</p>
  
  <pre><code>Col1    Col2
  1         A
  2         A
  3         B
  4         B
  5         A
  6         A
  7         B
  8         B
  </code></pre>
  
  <p>and if we applied the following query </p>
  
  <pre><code>Select * from mytabl1 where Col2 = 'A' or Col2 = 'B'
  </code></pre>
  
  <p>I expected the result to be like the following order (original order):</p>
  
  <pre><code>Col1    Col2
  1         A
  2         A
  3         B
  4         B
  5         A
  6         A
  7         B
  8         B
  </code></pre>
  
  <p>but what i got is the following:</p>
  
  <pre><code>Col1    Col2
  1         A
  2         A
  5         A
  6         A
  3         B
  4         B
  7         B
  8         B
  </code></pre>
  
  <p>the result looks like grouped by Col2, can i have good explanation for this behavior? how can i got the result like what i expected without using order by? because it will cause performance issue on huge data (millions) as i experienced before.</p>