title: Creating good indexes for table
body: <p>I'm working with a MariaDB (MySQL) table which contains information about some map points (latitude and longitude) and a quantity.</p>
  
  <p>I'm making a lot of querys that retrieve some of this points and I want to optimize the query <strong>using indexes</strong>. I don't know how to do it well.</p>
  
  <p>My queries are like this:</p>
  
  <pre><code>SELECT p.id, p.lat, p.lon, p.quantity 
  FROM Points p 
  WHERE ((p.lat BETWEEN -10.0 AND 50.5) AND 
         (p.lon BETWEEN -30.1 AND 20.2) AND 
         (100 &lt;= p.quantity AND 2000 &gt;= p.quantity)) 
  ORDER BY p.name DESC;
  </code></pre>
  
  <p>So, the columns involved in the queries are: <code>lat</code>, <code>lon</code> and <code>quantity</code>.</p>
  
  <p>Could anyone help me?</p>