Is it feasible to store a sqlite DB containing 333,000 rows locally on an iPhone/iPod Touch?
I have a huge table, which has 3 columns and about 333,000 rows. The sql dump is about 58 MB, and the sqlite DB containing this one table is about 20 MB.
I want to implement a sort of "autocomplete" where the user types into a UISearchBar
and a UITableView
gets updated. I have it working where every time the user types a letter it makes an HTTPrequest, but there's a very noticeable lag between the time the user types a letter and the UITableView gets updated. I was thinking storing the DB locally would speed things up, but开发者_运维技巧, it's a very large DB.
Is it feasible to store that large of a DB on a device? Would using Core Data be a better option?
CoreData will end up using sqlite, so if you manage your memory correctly, and depending on how many records you handle at 1 time, you should be Ok.
Seems reasonable to me. I'd just go for it!
You might want to also look into TokyoCabinet. It might be better suited for your requirements. If it is, you should look at the BNRPersistence code to help manage the data: https://github.com/hillegass/BNRPersistence
精彩评论