On Tue, Apr 19, 2011 at 03:29:42PM +0100, Simon Slavin scratched on the wall:
> 
> On 19 Apr 2011, at 2:58pm, Adam DeVita wrote:
> 
> > Our application is typically implemented on a standard laptop PC.  It seems
> > that the symptoms displayed are consistent with what this list describes
> > would happen,  so it looks like I can start thinking of how to write a
> > defence.   It does suddenly become very slow.
> > 
> > I think the potential solutions we may implement  are all in application
> > code, so not really an SQLite problem.
> 
> If you are using an in-memory database purely for speed, you might try
> the simple change of not doing that.  Make your database use disk
> space as any normal one would, and delete it after you close it. 
> Windows is pretty good at caching stuff these days and on-disk
> databases aren't as slow as some people would guess.

  You can pass the sqlite3_open*() calls an empty string for the
  filename.  That will create a disk-backed temporary database that
  automatically cleans up after itself.  If you crank the SQLite cache
  up, the performance should be roughly the same as an in-memory
  database, right up until it runs out of memory.  After that, the
  performance should be a bit better, as SQLite's cache is likely to
  be more efficient than paging memory to disk.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to