Are there CouchDB Views?

If I want to quickly grab data from CouchDB, is it significantly faster to grab one document from its ID than grab a view and then just use the corresponding document in that view?

+3


source to share


1 answer


Picking up a document by its ID uses an inline view _all_docs

, which is the main index.

The only difference from secondary indexes as the kind you talked about is that the primary index is always updated - there will never be time to update the index when a query comes in.



tl; dr Both query comparison options have no performance difference as long as the indexes are up-to-date. Otherwise the ID in the main index wins.

+5


source







All Articles