Memory management when using sqlite database in iphone

前端 未结 6 1201
我在风中等你
我在风中等你 2021-02-03 16:18

My application makes use of a SQLite database to store the user\'s inputs. The number of records in the input would go to around 100 records and I have a lot of SQL operations g

6条回答
  •  遥遥无期
    2021-02-03 16:52

    I've had memory usage shoot up in SQLite when doing many INSERTs (> 1000) in a row. Write performance was also slow. These issues were almost completely eliminated by wrapping the loop doing the INSERTs in a transaction. I posted some sample code for this in response to this question.

提交回复
热议问题