> -----Ursprüngliche Nachricht----- > Von: John Stanton [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 1. Dezember 2006 19:59 > An: sqlite-users@sqlite.org > Betreff: Re: [sqlite] for what reason :memory: is much slower than > /dev/shm/dummy.db > > > Eduardo Morras wrote: > > At 09:34 01/12/2006, you wrote: > > > >> Hi there, > >> > >> we are on an challanging project with very high requirements on > >> performance. > >> When doing some debugging we discover, that the sqlite method for > >> creating > >> an memory-based database is much slower than using e.g /dev/shm on > >> linux or > >> /tempfs on solaris. (We have measured an 20min performance > advantage > >> for the > >> /dev/shm style on a batch run which takes 70min with > :memory: and just > >> 49min > >> using /dev/shm. > >> Because our project needs to be ported to windows - the > /dev/shm is > >> not an > >> option - because win2000 does not support any temporary > memory based file > >> system. But beside that, we guess, that there will be a > possiblity to > >> tune > >> :memory: or we belief, that we to something wrong when > using :memory: > >> (for > >> example pragma page_size ...). > >> Is there any body who can give us some advises to tune up > our :memory: > >> database to become as fast as the /dev/shm alternativ? > >> > >> Thanks > >> roland > > > > > > On our project we desisted to use :memory: databases, only > a ram disk > > file system. From time to time make a snapshot to hard disk > or other > > persistent medium. > > > > In windows i suppouse you can make a ram disk using malloc and copy > > there your database file, set the pragma for temporary > files to memory > > and disable journaling. Make a new io routines access based > on windows, > > open/close, write/read etc... for access your memory malloc > ram disk. > > Again, from time to time stop reads/writes to database and > save it to disk. > > > > HTH > > > > > You might find you can get the same performance in a simpler > way by just > disabling synchronous writes. Read Dr Hipp's explanation of a memory > database for the reason. Hi,
synchronous writes already disabled. The performance difference occours without synch-writes. thanks roland > > -------------------------------------------------------------- > --------------- > To unsubscribe, send email to [EMAIL PROTECTED] > -------------------------------------------------------------- > --------------- > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------