Closed nicolaisi closed 7 years ago
This isn't specific to this couch library, it's just like any code. Holding objects in the program will consume your available memory. Too many at once, and you'll run out.
I'm going to assume that you don't need to have access to every single one of them at a time. Instead, you can process through them in batches.
Say you want to get every document in a view, you can do this;
You end up holding no more than 1000 documents in memory at once, and your app will be much 'appier.
It's discussed in more detail here; http://guide.couchdb.org/draft/recipes.html#pagination
Yes, I don't have much idea with PHP, so I'm guessing it might has something to do with object allocation. The reason I thought it might work is due to my previous experience with python couchdb libraries, it never seems to be a problem to query a crazy amount of data at one time. So, if this has nothing to do with the library, then I think I can assume this is a restriction from the PHP.
Thanks for your explanation.
Hi,
I'm facing this error
I'm retrieving a huge amount of documents from my view.