System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: 2cd99601e66566c39a722bc8b3b884832baa99b3
Title: BulkCopy support
Status: Open Type: Feature_Request
Severity: Minor Priority: Low
Subsystem: None Resolution: Open
Last Modified: 2018-01-24 08:27:31
Version Found In: 1.0.66.0
Description:
BulkCopy support would be great in the near future

regards, Simon

User Comments:
anonymous added on 2018-01-24 08:27:31:
I created a "BulkCopy" class based on a insert statement with parameters and multiple value sets.

INSERT into <table> (Column1, Column2) values (?,?),(?,?)

The interface has an array of types for the columns and a IEnumerable<object[]>.

The advantage over a normal insert statement. It removes a lot of overhead and checks. The inner loop only binds the parameters, execute, reset and clear the statement. That's super fast. With this solution I was able to insert (int, string of 1 char) over 3 million rows per second on my machine.