couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yasuhiro ABE <>
Subject Implemented SELECT COUNT(DISTINCT key) SQL query like operation.
Date Wed, 15 Dec 2010 11:18:56 GMT
Hi all,

I implemented the group_numrows operation which calculates the number of reduced group rows.
As an example, a view has four unique keys.

    $ curl 'http://localhost:5984/example/_design/all/_view/all?group=true'

The operation with gorup_numrows=true returns the total number of rows.

    $ curl 'http://localhost:5984/example/_design/all/_view/all?group=true&group_numrows=true'

My view has almost 100k unique keys that the reason to implement this operation.
My implementaion is ad-hoc, but if you have huge results set and just needs the total number
and small subset of the results, it might be useful.

More details and the patch is available from my blog;

Yasuhiro ABE   <>  <>

View raw message