Small. Fast. Reliable.
Choose any three.
*** 100,102 ****
--- 100,107 ----
  *:  Make sure that each thread opens the database file and keeps its own sqlite structure.
  *:  Make sure you handle the likely possibility that one or more threads collide when they access the db file at the same time: handle *SQLITE_BUSY* appropriately. 
  *:  Make sure you enclose within transactions the commands that modify the database file, like *INSERT*, *UPDATE*, *DELETE*, and others.
+ 
+ **Multithreading and Temporary Tables**
+ 
+ When you use temporary tables, the main database is not locked, so, for instance, one thread can do read operations on the temporary table at the same time as another thread is doing write operations on a table in the main database.
+ This feature can often be used to great advantage when having multithreaded access to the database. By creating a temporary table containing the results of a large query for processing, rather than processing it directly out of the main database, you greatly reduce lock contentions.