couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Update of "Introduction to CouchDB views" by BrianCandler
Date Thu, 25 Jun 2009 09:32:04 GMT
Dear Wiki user,

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

The following page has been changed by BrianCandler:

The comment on the change is:
Add some links and a stronger restriction on reduce/rereduce processing

  For more details see [ this blog post]
+ Furthermore: you have no control over how documents are partitioned in reduce and re-reduce
phases. You cannot rely on "adjacent" documents all being presented at the same time to the
reduce function; it's quite possible that one subset will be reduced to R1, another subset
will be reduced to R2, and then R1 and R2 will be re-reduced together to make the final reduce
value. In the limiting case, consider that each of your documents might be reduced individually
and that the reduce outputs will be re-reduced together (which also may happen as a single
stage or in multiple stages)
+ So you should also design your reduce/re-reduce function so that
+ {{{
+ f(Key, Values) == f(Key, [ f(Key, Value0), f(Key, Value1), f(Key, Value2), ... ] )
+ }}}
  === Reduced Value Sizes ===
  As CouchDB computes view indexes it also calculates the corresponding reduce values and
caches this value inside each of the btree node pointers. This scheme allows CouchDB to reuse
reduced values when updating the btree. This scheme requires some care to be taken with the
amount of data returned from reduce functions.
@@ -225, +233 @@

  See [ this blog posting] for an
interactive tutorial (emulator in JavaScript) that explains map/reduce, view collation and
how to query CouchDB RESTfully.
+ == Implementation ==
+ These blog posts include information about how map/reduce works, including how reduce values
are kept in btree nodes.
+  * []
+  * []
+  * []
+ These mailing list posts may also be helpful:
+  * [<>]
+  * [<>]

View raw message