couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Update of "FUQ" by RandallLeeds
Date Thu, 01 Dec 2011 22:05:03 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "FUQ" page has been changed by RandallLeeds:

Answer the emit(key, doc) question.

  == Views ==
   1. In a view, why should I not {{{emit(key,doc)}}} ?
+   The same effect can be acheived by using {{{emit(key,null)}}} and ?include_docs=true with
the view request. This approach has the benefit of not duplicating the document data in the
view index, which reduces the disk space consumed by the view. On the other hand, the file
access pattern is slightly more expensive for CouchDB. It is usually a premature optimization
to include the document in the view. As always, if you think you may need to emit the document
it's always best to test.
   1. What happens if I don't ducktype the variables I am using in my view?
   1. Does it matter if my map function is complex, or takes a long time to run?

View raw message