What kind of time should I be hoping to achieve inserting 300k records into a SQLite DB? I've written an app in UWP for Windows Phone 10.

When the app starts, I need to insert 307,750 records into a table. It's currently taking approximately 120 seconds to complete - I've wrapped it in a transaction.

I've been trying to improve performance changing various things but nothing seems to get it any faster than it currently is. Some of the blogs I've read about performance suggest using transactions but I'm already doing this.

does anyone know if this insert time is about the best I'm going to get? Example of the SQL below:

BEGIN;
INSERT INTO Point (X, Y, PolygonId) 
VALUES (1,1,1) ,(1,1,2), (1,1,3), ...300,000 more...
COMMIT;
Things to improve performance of multiple inserts in SQLITE:

wrap in a transaction

You already done it. This is the first and most important thing.

Don't use big sentences

You can split the insert statement in serveral

INSERT INTO Point (X, Y, PolygonId) 
  VALUES (1,1,1) ,(1,1,2), (1,1,3), ...100 or less... ;
INSERT INTO Point (X, Y, PolygonId) 
  VALUES (2,1,1) ,(2,1,2), (2,1,3), ...100 or less...;
... 10.000 or more statements


Use prepared statements

If the API allows that you can use prepared queries:

INSERT INTO Point (X, Y, PolygonId) values ($1, $2, $3); 


and send the data separately