How to use skip option in Cloudant or CouchDB?

Are there potential penalties for using the index skip option in Cloudant or CouchDB? Is there a better way to use it?

+4
source share
1 answer

Writing and querying MapReduce Views in CouchDB has a great example and description for using the skip parameter:

The skip parameter can be used together with the limit parameter to implement pagination. However, skipping a large number of lines can be inefficient. Instead, set the skip value to 1 and use the key of the last line on the previous page as the startkey parameter (end key if the output is changed), and the document ID of the last line on the previous page as startkey_docid (endkey_docid if the output is inverted). This should give you better performance, as CouchDB does not need to scan the entire range of skipped lines. "

There is also similar information in Scaling CouchDB

+3
source

All Articles