> I'm using sqlite in a c++ program, using functions sqlite3_open, > sqlite3_exec, sqlite3_close etc. > > I am trying to import a lot of data, probably around 100,000 rows+. I have > found it > quicker if I format the data into SQL statements and then use > the shell statement .read to read in the SQL from file and > populate the database, similar to the following:
You probably need to wrap a transaction around your insert statements. You might want to consider using the step() function instead of exec when you have parameters. It prevents sql injection attacks and a lot of fiddling with strings.