Jaco Breitenbach wrote:
Dear all,

My application consists of several indepent processes that must all access
(read) the same data table during processing.  In order to optimise memory
usage I was wondering if it is possible to load an in-memory SQLite
database into shared memory.  The database would be maintained by a
separate management process and all other processes would only require read
access.  This way only one copy of the database would have to be held in
system memory.

Is this possible with the current implementation of SQLite?  Any
suggestions would be welcome.

The OpenLDAP MDB (memory mapped database) library will do exactly what you want. Since it uses a shared memory map to access the DB, no matter how many processes access it concurrently there's only one copy of data present in RAM. It also performs reads faster than anything else, even pure in-memory databases. Nothing else is anywhere close to as efficient as MDB for reads.

Read more here http://highlandsun.com/hyc/mdb/

The port of SQLite using MDB as its backend is available on gitorious
https://gitorious.org/mdb/

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to