Are there CouchDB Views?
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 to share