Re: [sqlite] How lock is implemented upon write?

2019-07-01 Thread Simon Slavin
You might want to take a look at the standard VFSen: At a low level, SQLite depends on the VFS for reliable locking. The main parts of SQLite call a routine supplied by the VFS. The VFS does the actual locking. If we didn't answer

[sqlite] How lock is implemented upon write?

2019-07-01 Thread Peng Yu
Hi, I am trying to understand how lock is implemented in sqlite3. But the following manual page is too much such that I can figure out the main low level implementation techniques. https://www.sqlite.org/draft/lockingv3.html Could anybody provide some equivalent python code (other high level

Re: [sqlite] WAL mode much slower in certain use cases

2019-07-01 Thread David Raymond
When you're inserting in WAL mode everything will basically have to be written twice. First the new page data will be written to the WAL, and then when a checkpoint happens the WAL file will be copied over to the main database file. With rollback journal mode the contents of the original page

[sqlite] WAL mode much slower in certain use cases

2019-07-01 Thread Andrew Cunningham
I am using SQLite 3.24.0, as a single user persistent data store for storing simulation data. The database can grow to many gigabytes as the software can ingest a lot of binary data which I store as multiple BLOBs. In the following example I am reading several 22GB of data into the DB. Times

[sqlite] modify table (again)

2019-07-01 Thread Thomas Kurz
Dear all, I really followed the 12-step ALTER TABLE schema and stumbled upon the following problem: PRAGMA foreign_keys=1; CREATE TABLE A (id INTEGER PRIMARY KEY, v1 TEXT, v2 INTEGER); CREATE TABLE B (id INTEGER PRIMARY KEY, ref REFERENCES A(id)); INSERT INTO A (v1, v2) VALUES ('test7', 7);