couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Burt <imtrues...@gmail.com>
Subject Every view has to be run on every record?
Date Fri, 28 Jan 2011 21:05:14 GMT
Does every change to a view require a view update for every single document?

I was watching a youtube video and someone (I think it was Jan) said there
was a couchdb that had "millions of databases".  Someone in the chat asked
for clarification, and he repeated it.  It got me thinking about
reorganizing my project and combining what was many couchdb databases into a
single database.  But if there is no way to convince a view change that it
need only evaluate a subset of documents, then this approach has to be
totally static in structure.

    "all": {
      "map": "function(doc) { if (doc.Type == 'customer')  emit(null, doc) }"
    }

If you were to change the emit to being something different, but the if
(doc.Type=='customer') part stayed the same, do you really have crawl every
record to rebuild an index when the index already knows which documents are
relevant?

Thanks,

George

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