On Mon, Aug 30, 2010 at 5:34 PM, Pankaj Chawla <pankaj...@gmail.com> wrote:

> I think keeping temp files in memory is a good idea but i was concerned
> as I read at a few places that if  rollback journals are kept in memory
> then
> on power outage
> you not only lose the 2 minutes data but can have a corrupt DB in hand as
> there
> is no journal to lookup to for rollbacks. Is that correct?
>
>
I don't know what was the scenario Michael had in mind, but I'd create a
temporary table, fill it with data (there will be no single change to the
main db ) then after 2 minutues work perform INSERT INTO MyMainTable SELECT
* FROM MyTempTable. So this is the query that actually affects the contents
of the main db (and writes also to the journal file). This one can be
interrupted with a power failure and in this case on a next open sqlite will
try to restore the state that was before the transaction started

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

Reply via email to