Interesting.. can multiple threads share the same in-memory database
through multiple sqlite_open()s? From what I can scrape together from
the wiki page http://www.sqlite.org/cvstrac/wiki?p=InMemoryDatabase),
it sounds like the best one could do is create the in memory db handle
once in the main thread, then provide serial access to the db handle
via a get method for all the each thread.

It would be nice to have option that just loads the db file into
memory or  otherwise caches the contents wholly in memory.  Are there
any caching options in sqlite that would mirror this behavior?

Thanks,
-John

On 7/6/05, Cory Nelson <[EMAIL PROTECTED]> wrote:
> assuming you open up a :memory: database:
> 
> attach 'foo.db' as bar;
> create table baz as select * from bar.baz;
> detach bar;
> 
> doesn't copy indexes, so you'll have to remake them.  dont think it
> copies triggers either.
> 
> On 7/6/05, John Duprey <[EMAIL PROTECTED]> wrote:
> > Is it possible to load an SQLite file database into an SQLite "in
> > memory" database?  If so what is the most efficient method to do this?
> >  I'm looking for the fastest possible performance.  Taking out the
> > disk I/O seems like the way to go.
> >
> > Thanks,
> > -John
> >
> 
> 
> --
> Cory Nelson
> http://www.int64.org
>

Reply via email to