Sqlite3: Disabling primary key index while inserting?

后端 未结 3 1598
深忆病人
深忆病人 2020-12-05 11:44

I have an Sqlite3 database with a table and a primary key consisting of two integers, and I\'m trying to insert lots of data into it (ie. around 1GB or so)

The issue

3条回答
  •  攒了一身酷
    2020-12-05 11:55

    Are you doing the INSERT of each new as an individual Transaction?

    If you use BEGIN TRANSACTION and INSERT rows in batches then I think the index will only get rebuilt at the end of each Transaction.

提交回复
热议问题