ConnectSQLite(ConnectPath); //建立数据库连接并打开数据库
SQLiteCommand cmd = new SQLiteCommand(); //建立SQLite命令对象
cmd.Connection = conn; //设置SQLite命令的执行对象
//插入数据
for (int a = 0; a < 1000; a++)
{
cmd.CommandText ="INSERT INTO [Merchandise] (ID,有效, 编号,商品名,照片数量) VALUES (" + a.ToString() + ",'T', '123', '3R',200)";
cmd.ExecuteNonQuery();
}
conn.Close();
以上是对ConnectPath的SQLite插入1000条记录,用时1分12秒,但看别人的插入速度是30000条记录只需要5分钟,我这代码应该怎么改才能提高速度?