Re: [sqlite] 3.29.0 .recover command

2019-08-06 Thread Keith Medcalf
On Tuesday, 6 August, 2019 04:27, Olivier Mascia inquired: >On one database instance, a .dump command gives me (among many other >lines) things like: > >INSERT INTO STATISTICS VALUES(11237795927160,11868); > >while the output of .recover command gives me things this way: > >INSERT INTO

Re: [sqlite] 3.29.0 .recover command

2019-08-06 Thread Simon Slavin
On 6 Aug 2019, at 7:51pm, Dan Kennedy quoted: >> INSERT INTO 'STATISTICS'('_rowid_', STATDATE, DISKUSED) VALUES( 1, >> 11237795927160, 11868 ); Quoting these entity names using apostrophes looks wrong to me. It may work but someone might read it, know it's official output from a program

Re: [sqlite] 3.29.0 .recover command

2019-08-06 Thread Dan Kennedy
On 6/8/62 17:26, Olivier Mascia wrote: On one database instance, a .dump command gives me (among many other lines) things like: INSERT INTO STATISTICS VALUES(11237795927160,11868); while the output of .recover command gives me things this way: INSERT INTO 'STATISTICS'('_rowid_',

Re: [sqlite] THREADSAFE (1, SERIALIZED) vs (2, MULTITHREAD)

2019-08-06 Thread Keith Medcalf
-- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. On Tuesday, 6 August, 2019 04:35, test user wrote: >So in summary, there is no difference in the multi threaded >performance that can be gained between SERIALIZED and

Re: [sqlite] THREADSAFE (1, SERIALIZED) vs (2, MULTITHREAD)

2019-08-06 Thread Keith Medcalf
On Tuesday, 6 August, 2019 04:35, test user wrote: >When SQLITE_THREADSAFE=(1, SERIALIZED), how are the reads/writes >queued? Is it per connection, file, or process? >Quote: I don't know exactly what you mean by "how are read/writes >queued". >Quote: if you make two simultaneous calls on the

Re: [sqlite] THREADSAFE (1, SERIALIZED) vs (2, MULTITHREAD)

2019-08-06 Thread test user
Quote: Please don't try to parallelize a part of your program which exists mostly to read or write to a SQLite database. SQLite is not a client/server system. Access to the database file on disk is a bottleneck. If you have 8 threads which spend most of their time executing SQLite calls, all

Re: [sqlite] THREADSAFE (1, SERIALIZED) vs (2, MULTITHREAD)

2019-08-06 Thread Olivier Mascia
> Le 6 août 2019 à 15:34, David Raymond a écrit : > >> "But you do need WAL to achieve multiple readers concurrency..." > > Nope, you can have concurrent readers with rollback journal mode. You just > can't have anyone writing while they're all reading. > > (Or I may just be misunderstanding

Re: [sqlite] THREADSAFE (1, SERIALIZED) vs (2, MULTITHREAD)

2019-08-06 Thread David Raymond
>"But you do need WAL to achieve multiple readers concurrency..." Nope, you can have concurrent readers with rollback journal mode. You just can't have anyone writing while they're all reading. (Or I may just be misunderstanding what you meant) ___

Re: [sqlite] THREADSAFE (1, SERIALIZED) vs (2, MULTITHREAD)

2019-08-06 Thread Simon Slavin
On 6 Aug 2019, at 11:34am, test user wrote: > - Does the second request just take longer to return from the FFI call whilst > waiting for the mutex? Yes. You do not need to build backoff-and-retry code into your own software. SQLite does it for you. For every database connection you open,

Re: [sqlite] 3.29.0 .recover command

2019-08-06 Thread Olivier Mascia
> Le 6 août 2019 à 14:18, Chris Locke a écrit : > >> I got foreign key constraint failures > > I don't know why one would work and one would fail, but usually, this > occurs when you insert a record which has foreign keys to another table, > but that table hasn't been imported yet. The

Re: [sqlite] THREADSAFE (1, SERIALIZED) vs (2, MULTITHREAD)

2019-08-06 Thread Olivier Mascia
> Le 6 août 2019 à 12:34, test user a écrit : > > So for example, if I had: > > - 8 cores > - 8 threads > - 8 db connections, 1 per thread > - 1 database file > - x amount of read requests per second > > If I were to load balance x requests over each of the 8 threads, all the > reads would

Re: [sqlite] 3.29.0 .recover command

2019-08-06 Thread Chris Locke
> I got foreign key constraint failures I don't know why one would work and one would fail, but usually, this occurs when you insert a record which has foreign keys to another table, but that table hasn't been imported yet. The workaround is usually to ensure all the 'lookup' tables are done

Re: [sqlite] Probable bug with SQLITE_DQS=0 regarding shell .schema command?

2019-08-06 Thread Olivier Mascia
> Le 6 août 2019 à 12:45, Richard Hipp a écrit : > > On 8/6/19, Olivier Mascia wrote: >> Using 3.29.0 with SQLITE_DQS. > > Is this the problem that was fixed here: > https://www.sqlite.org/src/timeline?c=fcd937d9786a82ef Indeed. — Best Regards, Meilleures salutations, Met vriendelijke

Re: [sqlite] Probable bug with SQLITE_DQS=0 regarding shell .schema command?

2019-08-06 Thread Richard Hipp
On 8/6/19, Olivier Mascia wrote: > Using 3.29.0 with SQLITE_DQS. Is this the problem that was fixed here: https://www.sqlite.org/src/timeline?c=fcd937d9786a82ef -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list

Re: [sqlite] THREADSAFE (1, SERIALIZED) vs (2, MULTITHREAD)

2019-08-06 Thread test user
Thanks, When SQLITE_THREADSAFE=(1, SERIALIZED), how are the reads/writes queued? Is it per connection, file, or process? Quote: I don't know exactly what you mean by "how are read/writes queued". Quote: if you make two simultaneous calls on the same connection (from different threads, for

[sqlite] 3.29.0 .recover command

2019-08-06 Thread Olivier Mascia
On one database instance, a .dump command gives me (among many other lines) things like: INSERT INTO STATISTICS VALUES(11237795927160,11868); while the output of .recover command gives me things this way: INSERT INTO 'STATISTICS'('_rowid_', STATDATE, DISKUSED) VALUES( 1,

Re: [sqlite] Probable bug with SQLITE_DQS=0 regarding shell .schema command?

2019-08-06 Thread Olivier Mascia
> Le 6 août 2019 à 10:27, Olivier Mascia a écrit : > > Using 3.29.0 with SQLITE_DQS. > > sqlite3 test1.db "create table A(I integer);" > sqlite3 test2.db "create table B(J integer);" > > sqlite3 test1.db > sqlite> .schema > CREATE TABLE A(I integer); > > sqlite> attach 'test2.db' as cloud; >

[sqlite] Probable bug with SQLITE_DQS=0 regarding shell .schema command?

2019-08-06 Thread Olivier Mascia
Using 3.29.0 with SQLITE_DQS. sqlite3 test1.db "create table A(I integer);" sqlite3 test2.db "create table B(J integer);" sqlite3 test1.db sqlite> .schema CREATE TABLE A(I integer); sqlite> attach 'test2.db' as cloud; sqlite> .schema Error: no such column: cloud sqlite> detach cloud; sqlite>