Why is my SQLite Database Slow to Write Sometimes?
SQLite writes its journal file to the disk by default, which in some use cases can lead to longer run times.
How Do I Make My Write-to Database Faster?
You can modify your instance to write the journal updates in memory or turn it off completely in the CI environment to improve performance. You can review the options on how to configure SQLite in your instance here on the SQLite site.