Hi!
Take a look at the following link:
http://www.sqlite.org/pragma.html
Especially the journal_mode, synchronous and temp_store pragmas.
In your case, I think you should tell the connection to create temp tables in memory, switch journal mode to memory and turn off synchronous mode:
string cmdText = "PRAGMA temp_store=2;
PRAGMA journal_mode=memory;
PRAGMA synchronous=0;";
If you use ATTACH to work with more than one db inside an already opened SQLiteConnection, don't forget to adjust journaling mode for the attached db within the same command text!
string cmdText = "ATTACH DATABASE 'dbFilePath' AS db2;
PRAGMA db2.journal_mode=memory;";
When detaching, I would switch back journal mode to default (delete)
string cmdText = "PRAGMA db2.journal_mode=delete;
DETACH DATABASE db2;";
Using these PRAGMAs, the speed of db writes will be much much faster!
Take a time and test all combinations of the mentioned PRAGMAs, because in my case, it was enough to turn synchronous mode off, and I did not have to play with journal_mode, it did not make a difference, but used significantly more memory to store TEMP tables.
I hope it was helpful.