Could this run faster by tweaking the db table setup or the queries? Are we adding much overhead when there aren't any new log entries to parse?