couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "souza.davirs" <souza.dav...@gmail.com>
Subject how to get last id changed.
Date Mon, 19 Aug 2013 15:41:59 GMT
I have this map:
function (doc) {
  if (doc.event == 'TEST')
emit (doc.data.id, doc.data);
}
reduce:
function (key, values) {
    var v = null;
    for (var d in values) {
    if (v == null | | values ​​[d]. date> v.date)
     v = values ​​[d]
     }
    return v
}

but it is very slow, how can I improve performance?

Thank you.



--
View this message in context: http://couchdb-development.1959287.n2.nabble.com/how-to-get-last-id-changed-tp7586830.html
Sent from the CouchDB Development mailing list archive at Nabble.com.

Mime
View raw message