On 20 Feb 2013, at 5:32pm, Seebs <se...@seebs.net> wrote: > First: The SQL is completely trivial. > Second: I am not having performance problems with sqlite, I am having > performance problems with :memory:. Performance on files is lovely.
This normally means that your computer has very little actual memory to devote to 'memory' uses. It is using a lot of swap space (or paging, or virtual memory, whatever you want to call it). So when you think you are doing calls which reference ':memory:' it actually has to fetch and write those parts of memory to disk. One way to spot this is to use a utility which shows how much of your memory is used for what. So use nmap or Task Manager or Activity Monitor or whatever to show memory usage on your computer, then open a database in ':memory:' and write 50 Meg of data to it. If one of the figures went up by 50 Meg then all that data is actually being kept in RAM. But I bet it's actually being written to disk. Because your OS is devoting lots of your RAM to other tasks and doesn't have enough room free. And since ':memory:' is actually being done by writing to disk, it's not faster than opening a database on disk. Simon. [Warning: I have omitted many distinctions in the above. If you want a sophisticated discussion of the difference between swapspace and virtual memory you know where to find it.] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users