> I call these function at each INSERT:
> sqlite3_prepare_v2(sq3, query, -1, &sq3_stmt, NULL);
> query holds the INSERT SQL.
> The question is what can I do to speed up the INSERT proces? The database is
> also opened by other processes, so I want to lock the table as short time as I
Those two are in conclict. You might like to try putting BEGIN … END around your inserts just for testing.
In addition to putting mutiple inserts within a single transaction (this saves "disc" IO), you might like to look into using parameters (this saves on CPU spent parsing/compiling the statements. This leaves you with:
Von: sqlite-users [mailto:[hidden email]] Im Auftrag von Lev
Gesendet: Freitag, 03. November 2017 22:36
An: [hidden email] Betreff: [EXTERNAL] [sqlite] DB on JFFS
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.