couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David King <>
Subject Re: General-understanding questions about views
Date Sun, 29 Jun 2008 04:17:23 GMT
>> How would that total be updated if something were deleted or  
>> updated? Does
>> the sum() function have to be evaluated over doc.Amount of *every*  
>> doc on
>> every update?
> I don't grok the internals well enough to say exactly why, but I do
> know that one of the main features of CouchDB is the fact that only
> the changed documents (and a minimum of aggregation "re-reductions")
> need to be recomputed when an already mapped doc is updated or
> deleted.

But in the example I gave (that I got from the CouchDB wiki), there's  
no way for the reduction to be accurate in the face of deletions and  
modifications without re-calculating it for every single item in the  
database. That is, given a database of 5 million rows, every time one  
is modified or deleted (or possibly even added, depending on  
implementation), all 5 million rows have to pass through that function

Is there another way to handle modifications and deletions?

View raw message