Hello Vivek,

I have a very similar application, without the foreign key constraints, however. If you use sqlite3_prepare() once for your statement, then sqlite3_bind_...() with every call, and if you wrap all the inserts int one transaction (seems that you do), your speed schould be optimal.

However, I would very much like a "bulk insert" - call to sqlite (Oracle OCI does this, for example), where i can put many (thousands) of records into the database with one call. Is there any chance of something like this ever to be added to sqlite?

Martin

Rajan, Vivek K schrieb:

Hello-
In my application, I perform large number of insertions (~100K) to
create a SQLite database. The method which I currently have is
following:
- Start a transaction - Insert into database (~100K inserts)
   - During the insert process, I also have to query the already
inserted
     elements in the database to establish foreign-key constraints in
my schema. My schema is like a graph structure, with many foreign keys relationships
 - Close transaction

I am wondering if there techniques/tricks which can improve the total
insertion speed of my application. Any suggestions/feedback?

Vivek

Reply via email to