title: Use time interval to update and delete rows based on now()
body: <p>I am working on some game logic and I need a way to update a level when time runs out. Basically, there is a research table with columns as such:</p>
  
  <pre><code>research_time_id    
  research_started    
  research_end   
  active   
  level
  </code></pre>
  
  <p>I need the level to be set to level+1 when research_ended is sooner then NOW().</p>
  
  <p>I know how to write the UPDATE statement. My question is should I run this through mysql eventscheduler? should I run it every second? Is that too often? What is optimum in a scalable environment? This table could have many rows in it.</p>