incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Walgran <jwalg...@azavea.com>
Subject Paging large result sets with sorting
Date Thu, 17 Mar 2011 17:33:20 GMT
Assume a CouchDB storing and indexing housing inspection records. Each
inspection document as two important fields.

 - Home owner name
 - Inspection date

There are about 15,000 inspection documents generated per month.

I need to quickly retrieve a list of inspections for January, sorted
by home owner name.

The issue I am running into is the fact that the size of the result
set requires paging the data using limit and startkey. This would
required that the view key be the inspection date, which means the
results cannot be sorted by home owner name. The size of the data
means that pulling it all down to the client and sorting in the
browser is not performant.

Is there a clever way to solve this problem?


Thanks,

Justin

Mime
View raw message