title: Storing microseconds in MySQL: which workaround?
body: <p>we're writing a scientific tool with MySQL support. The problem is, we need microsecond precision for our datetime fields, which MySQL doesn't currently support. I see at least two workarounds here:</p>
  
  <ul>
  <li>Using a decimal() column type, with integer part corresponding to seconds since some point in time (I doubt that UNIX epoch will do, since we have to store measurements taken in 60's and 50's).</li>
  <li>Using two integer columns, one for seconds, the other one for microseconds.</li>
  </ul>
  
  <p>The most popular query is selecting columns corresponding to a time interval (i.e. dt_record > time1 and dt_record &lt; time2).</p>
  
  <p>Which one of these methods (or perhaps another one) is likely to provide better performance in the case of large tables (millions of rows)?</p>