I've been searching all over on this one. I'm running CouchDB 2.0 and understand I have a choice to make between using traditional views or the newer Mango query when retrieving a set of data.
So I'm currently using the Mango query syntax and getting the results I need - however I now need to implement pagination. When researching pagination in CouchDB 2.0 I found this excellent discussion around the topic:
http://docs.couchdb.org/en/2.0.0/couchapp/views/pagination.html
It suggests that the best way to paginate large data sets is not to use skip but instead to use startkey and perform a kind of linked list pagination from one page to the next.
So this makes sense to me and works for my application, but when I then turn to the Mango/_find API I can't see any way to pass in startkey:
http://docs.couchdb.org/en/2.0.0/api/database/find.html
Confusingly enough, it does accept a skip parameter, but there is no startkey.
Is anybody able to explain what is happening here? Are the performance characteristics much different in Mango/_find such that we can safely use skip on large data sets? Or should we be using views with startkey when traversing larger collections of data?
This particular question doesn't seem to get answered in any recent documentation AFAIK. Any help would be greatly appreciated.