title: MySQL DATE_ADD running too slow with dynamic interval
body: <p>I have the following query that's running pretty slow when executing it on thousands of records.</p>
  
  <pre><code>SELECT
      name,
      id
  FROM
     meetings
  WHERE
    meeting_date &lt; '2014-09-20 11:00:00' AND (
    meeting_date &gt;= '2014-09-20 09:00:00' OR
    DATE_ADD(meeting_date, INTERVAL meeting_length SECOND) &gt; '2014-09-20 09:00:00'
  )
  </code></pre>
  
  <p>The query checks if <code>meeting_date</code> overlaps in anyway between <code>2014-09-20 09:00:00</code> and <code>2014-09-20 11:00:00</code>. The above query covers all the possible overlapping cases. However, <code>DATE_ADD</code> adds a lot of overhead.</p>
  
  <p>Anyway to optimize <code>DATE_ADD</code>? Removing DATE_ADD greatly boosts the performance but it won't cover all overlapping cases.</p>