incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: Doc design / performace
Date Fri, 21 Oct 2011 15:58:29 GMT

On Oct 21, 2011, at 06:06 , Thomas Hommers wrote:

> Hi,
> 
> i am quite new to couchDB and trying to build a sales application.
> 
> I designed a document as product. One product consist of multiple sub-products that are
unique to one product.
> Next i designed a sales document that consists of multiple products. The quantity of
each sub-product can be chosen independent.
> 
> When i know want to see the total sales quantity, i created a view that runs through
all sales-docs and emits the sold quantity, with the product- and sub-product-number as keys.
This way I am able to see the sold quantity by product and by sub-product with a reduce function.
> 
> The problem i am facing is that it takes a long time to display an overview of all quantities.
> Did i maybe design something wrong and should take another approach? e.g. maybe I should
create a doc for each sub-product instead of having them all in one product-doc? Would this
be faster?
> 
> I am really thankful for any advice, hint or comment.

Can you give us some numbers? And show us some code? :)

Cheers
Jan
-- 





Mime
View raw message