title: mysql select todo tasks as per timestamp
body: <p>I am trying to select todo rows from mysql db using current time. Please check mysql query as following...</p>
  
  <pre><code>SELECT * FROM todos WHERE status = "pending" AND date(now()) = date(ts) AND hour(now()) = hour(ts) AND minute(now()) = minute(ts) ORDER BY id ASC LIMIT 1
  </code></pre>
  
  <p>It works fine but is there any way to optimize it better and fast? </p>
  
  <p>Thanks for your help.</p>