如题 fmdb怎样批量插入数据库 我现在是循环插入 实在太消耗性能了 求大神指教
看这里 http://stackoverflow.com/questions/11784143/fastest-way-to-insert-many-rows-into-sqlite-db-on-iphone
I'm inserting ~10,300 rows into an iOS sqlite database. It's around 7 seconds without transactions, just on 0.8 seconds within a transaction bracket
你难道不知道 FMDB 支持事务?
把所有操作加入一个事务中 就可以了
查查
beginTransaction