I’ve been messing around with the SQLite Designer in Visual Studio 2008 and I have noticed that when I use the generated Insert/Update statements they run extremely slow.
Example: I have a data table with four columns and 5700 rows it took ~5 mins to insert the data into the database table
However, I wrote my own database connection and insert methods using parameters and a single transaction and the same 5700 rows were inserted in under 1 second.
Why is the generated code so slow and what is benefit to even using it?
Thanks.
Nathan
I’ve read that the default behavior in SQLite is to wrap each Insert statement in a Transaction, which I think explains the behavior you are seeing. When the SQLite Engine creates the Insert statements it takes a long time and when you write the sql it runs very quickly.
http://www.sqlite.org/faq.html#q19