Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Simon Slavin
On 30 Aug 2010, at 2:34pm, Pankaj Chawla wrote: > Yes, I guess I am trying to figure out which poison to pick :-) > So here is what I need: > > 1. Lowest possible writes to the NAND. > 2. Highest possible database reliability in situations of power > outage/reboots >since the device is unmon

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Pankaj Chawla
> > > 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 t

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Pankaj Chawla
on behalf of Pankaj Chawla > Sent: Mon 8/30/2010 7:21 AM > To: General Discussion of SQLite Database > Subject: EXTERNAL:Re: [sqlite] Sqlite on NAND flash devices... > > > > HI Michael, > > Thanks for the reply. Wont keeping things in memory lead to chances of > db getting co

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Max Vlasov
On Mon, Aug 30, 2010 at 5:34 PM, Pankaj Chawla 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 ha

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Pankaj Chawla
> > > > From: sqlite-users-boun...@sqlite.org on behalf of Pankaj Chawla > Sent: Mon 8/30/2010 7:21 AM > To: General Discussion of SQLite Database > Subject: EXTERNAL:Re: [sqlite] Sqlite on NAND flash devices... > > > > HI Michael, >

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Max Vlasov
On Mon, Aug 30, 2010 at 4:21 PM, Pankaj Chawla wrote: > > Thanks for the reply. Wont keeping things in memory lead to chances of > db getting corrupt especially in cases of power failure or device reboots. > You have to decide what you want. The problem is if you don't want to be anything writte

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Black, Michael (IS)
f Pankaj Chawla Sent: Mon 8/30/2010 7:21 AM To: General Discussion of SQLite Database Subject: EXTERNAL:Re: [sqlite] Sqlite on NAND flash devices... HI Michael, Thanks for the reply. Wont keeping things in memory lead to chances of db getting corrupt especially in cases of power failure or dev

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Black, Michael (IS)
Analytics Directorate Northrop Grumman Information Systems From: sqlite-users-boun...@sqlite.org on behalf of Richard Hipp Sent: Mon 8/30/2010 7:20 AM To: General Discussion of SQLite Database Subject: EXTERNAL:Re: [sqlite] Sqlite on NAND flash devices... Use WAL

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Pankaj Chawla
formation Systems > > > > > From: sqlite-users-boun...@sqlite.org on behalf of Pankaj Chawla > Sent: Mon 8/30/2010 5:29 AM > To: sqlite-users@sqlite.org > Subject: EXTERNAL:[sqlite] Sqlite on NAND flash devices... > > > > Hi >

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Richard Hipp
Use WAL mode. Set PRAGMA synchronous=NORMAL. Do transactions that last 2 minutes each, starting a new transaction after each COMMIT. Run checkpoints in a background thread. On Mon, Aug 30, 2010 at 6:29 AM, Pankaj Chawla wrote: > Hi > > I have a Sqlite db on an embedded device on which there a

Re: [sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Black, Michael (IS)
ory(return 1) Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems From: sqlite-users-boun...@sqlite.org on behalf of Pankaj Chawla Sent: Mon 8/30/2010 5:29 AM To: sqlite-users@sqlite.org Subject: EXTERNAL:[sq

[sqlite] Sqlite on NAND flash devices...

2010-08-30 Thread Pankaj Chawla
Hi I have a Sqlite db on an embedded device on which there are inserts happening at a rate of 1 insert every 3 seconds. That being the case if Sqlite does file close/sync every 3 seconds it is going to wear off the NAND in no time. I tried to instead put 2 mins worth of inserts inside a transactio