Many thanks. -----Original Message----- From: D. Richard Hipp [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 1:46 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] In-Memory Performance Comparisons
Drew, Stephen wrote: > > Can anyone tell me (or point me to any documentation) about the > differences in speed between using an on-disk DB and an in-memory one? > Try it for yourself. Like this: drh$ rm test.db drh$ time sqlite3 test.db <workload.sql >/dev/null real 0m2.908s user 0m1.683s sys 0m0.291s drh$ time sqlite3 :memory: <workload.sql >/dev/null real 0m1.697s user 0m1.635s sys 0m0.063s Your mileage will vary according to the content of workload.sql, of course. As a rule of thumb, the user time (the amount of time the process spends in user mode) will be similar. But for an in-memory database, the sys time (the amount of time used by the OS) will be much less, since there is no disk I/O. And realtime (a.k.a. wallclock time) will also typically be less since there are no waits for disk controllers. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565