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 may increase your
speed tremendously.

http://www.sqlite.org/lang_transaction.html

(Depending on your needs, you may possibly decide you want to complete a
transaction for every, say, 10,000 inserts instead of waiting for all
800,000.)

If using transactions still leaves you hungry for speed, you might decide to
reinstate the
   PRAGMA synchronous = OFF
that you mentioned, perhaps turning in on again after the tables are built.

If you need indexes, adding them after the tables are built can improve your
overall time.



Donald Griggs

Opinions are not necessarily those of Misys Healthcare Systems nor its board
of directors.


-----Original Message-----
From: CARTER-HITCHIN, David, FM [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 21, 2005 9:32 AM
To: 'sqlite-users@sqlite.org'
Subject: [sqlite] Slowness with in-memory database

Reply via email to