title: How to optimize and speed up current Magento SQL query?
body: <p>How to optimize current Magento SQL query?    </p>
  
  <pre><code>SELECT​ ​ customer_entity.email,​ ​ COUNT(sales_flat_order.increment_id)
  AS​ ​ number_of_orders
  FROM​ ​ customer_entity
  LEFT JOIN​ ​ sales_flat_order​ ​ ON​ ​ sales_flat_order.customer_email​ ​ =
  customer_entity.email
  GROUP​ ​ BY​ ​ customer_entity.email
  ORDER​ ​ BY​ ​ number_of_orders​ ​ DESC;
  </code></pre>