Re: [sqlite] Slowness with in-memory database

2005-12-21 Thread Jay Sprenkle
> Donald Griggs and Jay Sprenkle have suggested transactions, which I had not > been using, and I've wrapped the all 800,000 iterations into one tran and > that has reduced the time down to 6 minutes - thanks Donald and Jay!! > Problem fixed - it's now taking as much time to ship the data into

RE: [sqlite] Slowness with in-memory database

2005-12-21 Thread CARTER-HITCHIN, David, FM
erest Rate Derivatives IT 135 Bishopsgate LONDON EC2M 3TP Tel: +44 (0) 207 085 1088 > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 21 December 2005 14:54 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Slowness with in-memory database >

Re: [sqlite] Slowness with in-memory database

2005-12-21 Thread drh
"Griggs, Donald" <[EMAIL PROTECTED]> wrote: > Regarding: ... Something is misconfigured as it takes ~20 times as long to > insert into an in-memory db, as it does to select from Sybase and store to a > file. ... > > > I'm not sure you're using transactions. If not, BEGIN a transaction before >

Re: [sqlite] Slowness with in-memory database

2005-12-21 Thread Jay Sprenkle
Are the inserts inside a transaction? If you're doing a lot of identical inserts you can prepare your statement so it's parsed once and then just execute it repeatedly.

Re: [sqlite] Slowness with in-memory database

2005-12-21 Thread drh
"CARTER-HITCHIN, David, FM" <[EMAIL PROTECTED]> wrote: > Hi, > > Really hope someone out there can help me with this. > > I've written a C++ cache class which extracts ad-hoc data from a Sybase > database and inserts it into an in-memory SQLite database. This is working > fine but is very slow

RE: [sqlite] Slowness with in-memory database

2005-12-21 Thread Griggs, Donald
Regarding: ... Something is misconfigured as it takes ~20 times as long to insert into an in-memory db, as it does to select from Sybase and store to a file. ... I'm not sure you're using transactions. If not, BEGIN a transaction before starting the loop of INSERTs and END it when done. This