Optimize by only inserting data every minute. Warning requires database upgrade