Re: [sqlite] DB on JFFS

2017-11-04 Thread Simon Slavin
On 4 Nov 2017, at 4:29pm, Lev wrote: > That is a good idea, thanks. So it might look like this? > > BEGIN TRANSACTION; > > INSERT ... > INSERT ... > > COMMIT; Yes. > Also, I don't really know how to set up a cache. Don;’t bother with that at the moment. Simon.

Re: [sqlite] DB on JFFS

2017-11-04 Thread Lev
On Fri, 3 Nov 2017 21:40:52 + Simon Slavin wrote: > Those two are in conclict. You might like to try putting BEGIN … END > around your inserts just for testing. That is a good idea, thanks. So it might look like this? BEGIN TRANSACTION;

Re: [sqlite] DB on JFFS

2017-11-03 Thread Simon Slavin
On 3 Nov 2017, at 9:35pm, Lev wrote: > I call these function at each INSERT: > > sqlite3_prepare_v2(sq3, query, -1, _stmt, NULL); > sqlite3_step(sq3_stmt); > sqlite3_finalize(sq3_stmt); > > query holds the INSERT SQL. > > The question is what can I do to speed up the

[sqlite] DB on JFFS

2017-11-03 Thread Lev
I'm implementing an application that is on a flash filesystem (JFFS). The flash is connected to the CPU with SPI. I experience about 1s INSERT time. My DB isn't big, just about 200k. I implement a fifo like operation, so i have a fixed length row count. I DELETE old data from time to time. I