couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <>
Subject Re: Newbie questions
Date Wed, 24 Sep 2008 15:55:59 GMT
On Wed, Sep 24, 2008 at 1:43 AM, Ayende Rahien <> wrote:
> Okay, here are my current finding.
> Views are trees keyed by a different key than the DB. Not sure yet how this
> works with regards to sorting on non string data (dates,floats).

All the data in the files is serialized using term_to_binary (an
Erlang built in function). The keys can be non-string, because the
sorting (collation) order is defined for all of the valid JSON types
(and nested structures). See couch_view:less_json/2 for the sorting

I think the reuse of btree's for both databases and views is
especially elegant, as it means that any optimizations on pulling rows
by key, also speed up replication and normal operations.


Chris Anderson

View raw message