You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2011/12/01 23:05:03 UTC

[Couchdb Wiki] Update of "FUQ" by RandallLeeds

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:
http://wiki.apache.org/couchdb/FUQ?action=diff&rev1=1&rev2=2

Comment:
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?