To me, it’s important to think of a tableView in the MVC or Model-View-Controller model. It’s just the view of the data. It should not be used as a data management tool. If you do a search and come back with 200 records, instead of loading 200 records into the tableView, load 50 and when you detect you’ve scrolled to the bottom, insert the next 50 records, kind of like endless scroll on the Facebook App.
For instance, we made a sample app called CoronaWeather (https://github.com/coronalabs-samples/CoronaWeather)
In it I have a SQLite database of locations, with hundreds of thousands of city, latitude and longitude data. I setup a search bar, which actually uses a tablleView to display the search matches. Imagine typing in “San”. In early versions I was crushing the tableView tying to insert ever city that beings with “San” in it. In my case I chose to only load up a fixed number of items only after the filter reduced the total search results to a manageable amount. No one is going to scroll through 400 cities that start with “San” looking for San Joee. They can type in "San J"and get fewer records to look with.
But the key point I want to make is that the data look up happens on the SQL database and not the tableView. The tableView is there to only show the hand full of selected records and the code (the controller in this example) is responsible for deciding the number of records to insert into the view.
Take a look at what I did with the CoronaWeather app. All the stuff is happening in location.lua.
Rob