title: OrderBy on non unique columns will work in index scan?
body: <pre><code>id    market_id      date          keyword                 sku            a             b         c  
  1        1        2019-01-01    some text for this      QAB-XU-VV        3.1           2.4       3.5
  2        2        2019-01-02    some text for text      ABC-XA-VV        2.1           4.1       1.2
  3        1        2019-01-03    some text for XXX       DDD-XA-RR        2.7           3.5       4.1
  </code></pre>
  
  <p>I need to query like this </p>
  
  <pre><code>   SELECT
        sku,
        keyword,
        SUM(a),
        SUM(b),
        SUM(c),
      FROM A
      WHERE market_id = 2 AND date BETWEEN '2020-01-01' and '2020-02-02'
      GROUP BY sku, keyword
      LIMIT 10
      OFFSET XX
  </code></pre>
  
  <p>I used <code>SampleTable</code>(assume this table as <code>SampleTable</code>) and <code>SampleTable(sku, keyword)</code> composite-index. so this query will do <code>index scan</code>. query time is fast but I need to add <code>LIMIT...OFFSET</code> for pagination.So what I need to know is that this query will sort as <code>SORT BY ID</code>? I can't use <code>ORDER BY ID</code> since if I use this, this query will do <code>file sort</code> and will be very slow since it will use <code>full scan</code> instead of <code>index scan</code>. Here is what I'm confusing.</p>
  
  <blockquote>
    <p>MySQL has two ways to produce ordered results: it can use a filesort,
    or it can scan an index in order.</p>
    
    <p>Ordering the results by the index works only when the index’s order is
    exactly the same as the ORDER BY clause and all columns are sorted in
    the same direction (ascending or descending).</p>
    
    <p>The ORDER BY clause also has the same limitation as lookup queries: it
    needs to form a leftmost prefix of the index. In all other cases,
    MySQL uses a filesort.</p>
  </blockquote>
  
  <p>Please help me what I'm wrong. Thank you.</p>