history: More sqlite transactions

10 jobs for wip/sadiq/speedup-db in 17 minutes and 51 seconds (queued for 4 seconds)