Aprove answer

You should store the data via a persistent mechanism after downloading the data, so you don't have to keep it all in memory.

Core data is one option.

If you save them to core data, then all your other issues already have well known and well used patterns (e.g., letting NSFetchedResultsController bridge between your data and your table view).

the problem is I can't manage to download all the data. I fetch the first 1000 rows, but then I can't fetch more rows. I made the for loop in - (PFQuery *)queryForTable, but no results. Please quide me how to implement it so i can get more than 1000 rows from parse. – Lalu

Having never used parse, I don't know. However, seeing as it is a network API, and they do have a fetch limit, I can't imagine that they encourage blasting N queries at the same time in a for-loop.

I would think that you should kick off one query, and then when that one has finished, start another one where the previous one left off until you have all the objects you need.

Interested in seeing how difficult it is to discover how to do this, I entered a simple google search for "parse.com query more than 1000" which results in a page full of answers for this exact question, and quickly landed me on a forum discussion entitled "Paging through more than 10,000 results." where there is an example that verifies what I said above.


I cannot imagine why you want to download 25k objects at once, to display it in a table view. Who should look at this huge table?
But if you really want to download 25k objects from Parse, you had to issue 25 queries, 1000 objects each. And the i-th query (starting with i = 0) had to be constrained by a query.skip = i*1000; see here.

More Answer related to the Same Query


You can set a variable i in a loop starting from zero and increment by 1 each time and use query.skip(i*1000) but that loop will also run upto 10000 only as you can't skip more than 10000 rows. Beyond that, you will have to set the skip to zero and add a constraint that for updatedAt and select only the old rows.

Credit Goes to: stackoverflow.com

Related question with same questions but different answers