incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: sort by reduce value
Date Thu, 13 Aug 2009 06:40:43 GMT
On Mon, Aug 10, 2009 at 01:56:49PM -0700, Chris Anderson wrote:
> The reason why CouchDB can't do the sorting by value inside itself is
> that on a multi node cluster, an individual couch can't know the
> global ordering. We have a commitment to ensuring that CouchDB's API
> remains invariant regardless of the size of the underlying cluster.
> So you basically have to copy the cluster-wide reduce values to an
> intermediate storage mechanism (which itself can be a cluster) before
> you can sort them by value.

Not sure I understand. If this is a sharded cluster, then each node could
sort its own subset of results; then it's very simple and efficient to merge
the already-sorted results together.

View raw message