#1 2011-03-27 08:05:33

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

bulk inserts via Synopse SQLITE Framework

Hi Arnaud,

With my planned program, the server will mostly receive new objects (IOW, insert commands) from multiple clients. In my previous experience with sqlite, wrapping a bunch of insert commands with 'BEGIN TRANS...' and 'COMMIT TRANS...' Can speed things up a lot. How we do this in Synopse sqlite?

And other tips you can give me to speed up such bulk insert operations?

Thanks!


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2011-03-27 08:08:56

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: bulk inserts via Synopse SQLITE Framework

You have TSQLRest.TransactionBegin and TSQLRest.Commit/RollBack methods for creating a transaction.

On a slow network, you could also use a Batch process to speed up the communication.
See http://synopse.info/forum/viewtopic.php?id=250

Offline

#3 2011-03-27 10:22:44

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: bulk inserts via Synopse SQLITE Framework

Wow! The batch update mode is great!


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB