incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciej Dziardziel <>
Subject Re: Many-to-many views sorted and paginated
Date Sat, 30 May 2009 20:50:08 GMT
Zoltan Lajos Kis wrote:

> I understand that if I stored registration data within event documents,
> e.g. by listing userid's, this would be as simple as emitting keys like
> [event.registered[i],, event.location] and then querying with
> "?startkey=[userid]&endkey=[userid, {}]&limit=20"
> However, for me it seems more appropriate from several aspects not to
> store the registration data within the event documents.

You could store those data in both places.

> 1. Using a view, which emits ( [, event.location], ),
> I get the list of all eventid's, properly sorted (without the documents).

Depending on the number of events this can kill your perfomance - 
downloading large amount of data (reading them first from disk)
looks for me like worst possible solution.

Maciej "Fiedzia" Dziardziel

View raw message