Is it possible to store a sqlite database containing 333,000 rows locally on iPhone / iPod Touch?

I have a huge table that has 3 columns and about 333,000 rows. The sql dump is about 58 MB, and the sqlite database containing this table is about 20 MB.

I want to implement a kind of "auto-complete" when the user enters UISearchBarand UITableView. I work where every time a user enters a letter, he creates an HTTP request, but there is a very noticeable lag between the way a user enters a letter and the UITableView is updated. I thought that storing a database locally would speed things up, but this is a very large database .

Is it possible to store such a large number of databases on the device? Would using Core Data be a better option?

+3
source share
3 answers

CoreData will end using sqlite, so if you manage your memory correctly and depending on how many records you process 1 time, you should be fine.

+1
source

It seems reasonable to me. I would just go for it!

0
source

You can also look at TokyoCabinet. It may be better suited to your requirements. If so, you should look at the BNRPersistence code to help manage the data: https://github.com/hillegass/BNRPersistence

0
source

Source: https://habr.com/ru/post/1783786/


All Articles