Re: [sqlite] Fwd: How can I make this faster?

2017-08-24 Thread Rowan Worth
On 24 August 2017 at 13:58, J Decker wrote: > Even though the process will always be single threaded access even if there > are multiple connections, it would be more helpful to have a > locking_mode=NONE. > > > > PRAGMA locking_mode = EXCLUSIVE gives me good speed, at the cost of only 1 > conn

Re: [sqlite] Fwd: How can I make this faster?

2017-08-23 Thread J Decker
On Mon, Aug 14, 2017 at 2:34 AM, Rowan Worth wrote: > On 14 August 2017 at 17:11, J Decker wrote: > > > I monitored the process with ProcMon (I'm on windows 7 BTW) > > > > 12:55:34.7416316 AM node.exe 9012 WriteFile > > \Device\HarddiskVolume17\javascript\gun.db\gun.db-wal SUCCESS Offset: > > 18

Re: [sqlite] Fwd: How can I make this faster?

2017-08-14 Thread Rowan Worth
On 14 August 2017 at 17:11, J Decker wrote: > I monitored the process with ProcMon (I'm on windows 7 BTW) > > 12:55:34.7416316 AM node.exe 9012 WriteFile > \Device\HarddiskVolume17\javascript\gun.db\gun.db-wal SUCCESS Offset: > 188,416, Length: 20,480, I/O Flags: Non-cached, Paging I/O, Synchrono

Re: [sqlite] Fwd: How can I make this faster?

2017-08-14 Thread J Decker
On Mon, Aug 14, 2017 at 2:11 AM, R Smith wrote: > > On 2017/08/14 9:29 AM, Simon Slavin wrote: > >> >> On 14 Aug 2017, at 7:52am, Clemens Ladisch wrote: >> >> Wrap everything into a single transaction. >>> >>> >> and CREATE the INDEXes after doing the INSERTs

Re: [sqlite] Fwd: How can I make this faster?

2017-08-14 Thread J Decker
On Mon, Aug 14, 2017 at 12:40 AM, Simon Slavin wrote: > > > On 14 Aug 2017, at 8:33am, J Decker wrote: > > > I'd have to wrap each one in a transaction. > > Each is really an atomic operation from a higher level program... and > each > > must complete before returning to the parent. > > There ma

Re: [sqlite] Fwd: How can I make this faster?

2017-08-14 Thread R Smith
On 2017/08/14 9:29 AM, Simon Slavin wrote: On 14 Aug 2017, at 7:52am, Clemens Ladisch wrote: Wrap everything into a single transaction. and CREATE the INDEXes after doing the INSERTs: BEGIN CREATE TABLE … INSERT … CREATE INDEX … COMMIT B

Re: [sqlite] Fwd: How can I make this faster?

2017-08-14 Thread Simon Slavin
On 14 Aug 2017, at 8:33am, J Decker wrote: > I'd have to wrap each one in a transaction. > Each is really an atomic operation from a higher level program... and each > must complete before returning to the parent. There may be no point in doing that. If you do not declare a transaction yours

Re: [sqlite] Fwd: How can I make this faster?

2017-08-14 Thread J Decker
On Sun, Aug 13, 2017 at 11:52 PM, Clemens Ladisch wrote: > J Decker wrote: > > So I have this sql script that inserts into a single table, and it is > VERY > > slow. > > Wrap everything into a single transaction. > > I'd have to wrap each one in a transaction

Re: [sqlite] Fwd: How can I make this faster?

2017-08-14 Thread Simon Slavin
On 14 Aug 2017, at 7:00am, J Decker wrote: > Also, is a unique constraint also an index? Your thinking is correct. SQLite creates an index for internal use when you declare that something must be UNIQUE. SQLite is usually clever enough to use this index for other purposes when it would sp

Re: [sqlite] Fwd: How can I make this faster?

2017-08-14 Thread Simon Slavin
On 14 Aug 2017, at 7:52am, Clemens Ladisch wrote: > Wrap everything into a single transaction. > and CREATE the INDEXes after doing the INSERTs: BEGIN CREATE TABLE … INSERT … CREATE INDEX … COMMIT BEGIN SELECT … COMMIT Simon.

Re: [sqlite] Fwd: How can I make this faster?

2017-08-13 Thread Clemens Ladisch
J Decker wrote: > So I have this sql script that inserts into a single table, and it is VERY > slow. Wrap everything into a single transaction. Regards, Clemens ___ sqlite-users mailing list sqlite-users@mailinglist

[sqlite] Fwd: How can I make this faster?

2017-08-13 Thread J Decker
(Sent to wrong address to start; forwarded here(?)) -- Forwarded message -- From: J Decker Date: Sun, Aug 13, 2017 at 10:57 PM Subject: How can I make this faster? To: General Discussion of SQLite Database So I have this sql script that inserts into a single table, and it is VER