couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hahn <>
Subject Re: Reduce just N rows?
Date Sun, 15 Apr 2012 18:06:41 GMT
 >    would at least reach thousands, so fetching all keys is quite

My suggestion may well be the wrong path to take, but I'd like to point out
that fetching thousands of keys is nothing.  Getting 16 kbytes of data
takes a few ms.  And  internally couch has all the keys already sorted and
ready to dump when you ask for it.  It's not like this 16K is going across
the wire to the client.

I use this kind of query all the time.  However, using a reduce would be
much better.  You could keep a list of the ten lowest values found so far.
 That is a finite amount of data and legal for a reduce.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message