title: Can I achieve scalable multi-threaded access to an in-memory SQLite database
body: <p>I have a multi-threaded Linux C++ application that needs a high performance reference data lookup facility. I have been looking at using an in-memory SQLite database for this but can't see a way to get this to scale in my multi-threaded environment.</p>
  
  <p>The default threading mode (serialized) seems to suffer from a single coarse grained lock even when all transactions are read only. Moreover, I don't believe I can use multi-thread mode because I can't create multiple connections to a single in-memory database (because every call to sqlite3_open(":memory:", &amp;db) creates a separate in-memory database).</p>
  
  <p>So what I want to know is: is there something I've missed in the documentation and it is possible to have multiple threads share access to the same in-memory database from my C++ application.</p>
  
  <p>Alternatively, is there some alternative to SQLite that I could be considering ?</p>