I want to display several hundred records from a database in a UITableView
. Though I could use CoreData, I decided to try using a SQLite database since I'm currently attending a lecture on databases. And although I possibly could load all of the data into an array, I don't want to minimize memory usage so that I can use sort of the same code for another application with more data as well. So my question is, how do I load the rows from the database which are currently displayed in the table view? The table I want to display has several attributes, the primary key is a string - the table should be sorted by this string. So how do I find out, what cells are displayed (indexes) and should I then use select * from mytable limit x,y
to obtain the rows I want to display or can I improve performance in any way (either with SQLite or with some great code).
Thanks for your help in advance!
BTW: I'm using FMDB if this doesn't make any difference.
Aucun commentaire:
Enregistrer un commentaire