Just as an FYI, here's a benchmark I recently ran on both (with a home-grown bulk load utility in C#):
Details:
- Bulk insert of ~165,000 rows of data to a single table
- Insert data came from a text file (CSV file, though was pipe-delimited)
- Data was a mix of strings, integers, currency, floats etc.
- Table had 28 columns
- Only primary key index was used during the insert to speed up inserts
For SqlCe I tried two approaches:
- parameterized query, using a Prepare() and a single transaction for the entire insert.
- SqlCeResultSet (updatable), with an SqlCeUpdatableRecord
For SQLite I tried the following:
- parameterized query, using a Prepare() and a single transaction for the entire insert.
Here were the approximate time in seconds:
- SqlCe with Parm query - 48s
- SqlCe with resultset - 16s
- SQLite with Parm query - 11s
As you can see, SQLite was the fastest, not only when comparing both databases with parameterized queries, but also compared to an updateable resultset (which is considered the best and fastest way by many when it comes to bulk inserts in sqlce).
I should note that I used the SQLite.Net data provider for the SQLite code. For SqlCe I used the v3.5 SP1.
Another interesting point. The SqlCe database was approx 29 MB after I ran the bulk insert. The SQLite database was approx 23 MB.