On Tue, 28 Jun 2005, Rasmus Christian Kaae wrote: >If you are running Windows you may use a similar memory-mapped file (see the >Win32API for details). > > >Does anyone know which is fastest -- Using a memory-mapped file (or >/dev/shm) in comparison with sqlite's internal memory mapped tree?
Haven't tested it, so take with a pinch of salt. </disclaimer> My guess is that the SQLite internel memory only representation will be quicker, as there is less data transformation being done. The SQLite disk image must be written in such a way that is n-bit and bi-endian clean, so that the file can be read on any platform. This doesn't come for free. The in-memory database, however, just uses native pointers and datatypes of the processor, so is much quicker to manipulate and traverse. If you're not keeping the data, the in-memory is almost certainly the best way to go. If in doubt, test it. As to the original question, I can't say I've ever used SQLite that way, but only because I want to keep my data as is. > >-- >Best regards / Med venlig hilsen >Rasmus Christian Kaae - [EMAIL PROTECTED] or [EMAIL PROTECTED] >Web: www.kalchas.dk www.eurojumping.com www.hestebasen.com >Office: E4-119, Aalborg University. >Mobile: +45 28 72 04 13 > > > >Quoting Ben Clewett <[EMAIL PROTECTED]>: > >> If you are using Linux, you can use the /dev/shm. This is a memory >> resident file system. I use this and find it about 200 times faster >> than writing to disk. The only problem is that this is erased when the >> server reboots. I hope this is of some use :) > -- /"\ \ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL X - AGAINST MS ATTACHMENTS / \