title: Creating an index on a timestamp to optimize query
body: <p>I have a query of the following form:</p>
  
  <pre><code>SELECT * FROM MyTable WHERE Timestamp &gt; [SomeTime] AND Timestamp &lt; [SomeOtherTime]
  </code></pre>
  
  <p>I would like to optimize this query, and I am thinking about putting an index on timestamp, but am not sure if this would help. Ideally I would like to make timestamp a clustered index, but MySQL does not support clustered indexes, except for primary keys.</p>
  
  <ul>
  <li><code>MyTable</code> has 4 million+ rows.</li>
  <li><code>Timestamp</code> is actually of type <code>INT</code>.</li>
  <li>Once a row has been inserted, it is never changed.</li>
  <li>The number of rows with any given <code>Timestamp</code> is on average about 20, but could be as high as 200.</li>
  <li>Newly inserted rows have a <code>Timestamp</code> that is greater than most of the existing rows, but could be less than some of the more recent rows.</li>
  </ul>
  
  <p>Would an index on <code>Timestamp</code> help me to optimize this query?</p>