Actually that's what I do: I compute the values on other threads and let the SQLite thread only pull from a queue. Profilers also confirm that >99% of the SQLite thread time is spent in SQLite code. I also verified that the computation is not the bottleneck, by first computing all results. After that I measured only the insertion loop time, which was the same.