Thanks for the link Richard, very interesting! 

What version(s) of SQLite contain this experimental functionality?  I am
using version 3.6.10 non-amalgamation but I can't find the functions
mentioned on that page.  If I understand this backup API correctly then
its functionality is pretty close to what I need.   I would need the
option for either the source or destination to be a buffer in memory or
a database connection.

Daniel

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of D. Richard Hipp
Sent: Wednesday, February 04, 2009 2:19 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Saving and loading SQLite pages from a buffer


On Feb 4, 2009, at 5:12 PM, Brown, Daniel wrote:

> Good Afternoon List,
>
> I've been looking at how best to save/load SQLite database that is  
> 100%
> in memory to and from a memory buffer instead of a file via a VFS
> operating system wrapper.  I had initially thought that implementing a
> Virtual File System (VFS) was a solution but then I realised that  
> would
> double my memory usage.  As I would be holding the pages internally in
> the VFS and SQLite would also be holding duplicates internally in its
> page system, as well as another partial set of duplicates in the  
> SQLite
> page cache.
>
> After thinking about this for a bit, a more efficient implementation
> could be to save or load the database pages held in SQLite's internal
> page system.  This would effectively involve two new functions being
> added to the SQLite API: one to seed the page system with pages
> contained in a supplied buffer (load) and another to copy pages out of
> the page system and into a buffer (save).
>
> I've had a look through the O'Reilly eBook "Inside SQLite" and through
> the SQLite source code and I think this solution is possible.  I would
> like to know if this approach seems a reasonable solution or not?  I
> would also appreciate any advice about safely modifying the page  
> system
> that anyone would be able to share.
>

http://www.sqlite.org/draft/c3ref/backup_finish.html

D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to