Re: [sqlite] How to open an sqlite3 for reading without being blocked by process writing to it?

2020-03-08 Thread Keith Medcalf
On Sunday, 8 March, 2020 21:24, Peng Yu wrote: >When I open an sqlite3 db using the following python code, >conn=apsw.Connection(filepath, flags = apsw.SQLITE_OPEN_READONLY) >, I got the following error. >Traceback (most recent call last): > File "/xxx.py", line 21, in >for x in

Re: [sqlite] How to open an sqlite3 for reading without being blocked by process writing to it?

2020-03-08 Thread Simon Slavin
[This explanation is much simplified for clarity. Before filling in missing details please consider what the OP wants. Don't just show off your exhaustive knowledge of SQLite.] A database is normally in delete journal mode, as if you'd executed PRAGMA journal_mode=DELETE In this journal

[sqlite] How to open an sqlite3 for reading without being blocked by process writing to it?

2020-03-08 Thread Peng Yu
When I open an sqlite3 db using the following python code, conn=apsw.Connection(filepath, flags = apsw.SQLITE_OPEN_READONLY) , I got the following error. Traceback (most recent call last): File "/xxx.py", line 21, in for x in c.execute('SELECT (data) FROM sqlar'): File "src/cursor.c",

Re: [sqlite] speeding up an FTS5 search with a JOIN

2020-03-08 Thread Puneet Kishor
Update: so, after much hitting of my head against the wall of sql, I came up with the following – as noted above, I really have two distinct set of queries I can do separately like so Q1: (SELECT t1Id FROM t1 WHERE …) AS a Q2: (SELECT t1Id FROM vt1 WHERE vt1 MATCH ‘bar’) AS b Then, I can do