Test running ANALYZE or PRAGMA optimize on SQLite exports
While playing around with SQLite for weird and oddly specific personal projects, I learnt about SQLite's ANALYZE command and how it works, which was the inspiration for how I got to fix #1309 (closed).
It might be interesting to try running ANALYZE at the very end of the export task, so that SQLite's query planner gets fresh information about the database's contents. As the docs recommend, it might be even better to run PRAGMA optimize instead of ANALYZE to make SQLite decide by itself whether or not to analyze. This requires some testing with both small and large corpora to see if this makes much of a difference, maybe enough that it could have saved some time with the Balsac export stuff without relying on a PostgreSQL server. It could also be useful for the base-worker cache.