On Wed, Aug 06, 2008 at 03:26:30PM -0700, Brown, Daniel scratched on the wall:
> Good afternoon list,
> 
> I would like to load my current database file completely into memory,
> mostly as an experiment to check SQLite's maximum memory footprint,
> however searching through the documentation I can only find references
> about how to create new databases that are completely memory resident.
> Is there a way to do this?  I'm currently using the SQlite console
> application for my testing if that makes a difference.

  If the database is fairly static in size, just figure out how many pages
  the database file takes up (default page size is 1K).  Make the page cache
  a bit larger than this via PRAGMA commands.  As you use the database,
  pages will be loaded into memory and generally stay there.  Adjust the
  write policy (sync, etc.) as desired, if you're looking for performance
  comparisons.

  Pages in the cache have an overhead of roughly 0.5K per page.  That
  should give you some idea of your memory footprint.

  See the website for more details.

   -j

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

"'People who live in bamboo houses should not throw pandas.' Jesus said that."
   - "The Ninja", www.AskANinja.com, "Special Delivery 10: Pop!Tech 2006"
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to