incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@grabb.it>
Subject Re: get multiple docs and multi/database vs bunch of views
Date Tue, 20 May 2008 21:40:55 GMT
Troy,

I'm not sure about the performance characteristics, but to answer your
other questions: I think an IN-clause like query is in the roadmap
(can't remember where I read this).

And you may be able to avoid hard-coding client_id into your views by
using the json collation order.

http://wiki.apache.org/couchdb/ViewCollation

You'd simply use an array like: [client_id, another_value] as your
view-key, and then use start-key and end-key to return just the rows
per client.

Chris

On Tue, May 20, 2008 at 2:23 PM, Troy Kruthoff <tkruthoff@blit.com> wrote:
> What is the best method for retrieving a group of documents from the server
> by id in a single request, similar to SQL's "IN" clause?  Or is this not
> possible, or planed for a future release (I've searched, but the answer is
> eluding me)
>
> Also, from a performance and limitation perspective, which would be a better
> practice for scoping records in a hosted b2b app scenario for each client:
>
> 1)  Create a separate couch database for each client.
>
> 2)  Use a single database and add a client_id field as a filter to all the
> views.
>
> I prefer #1 based on simplicity and security, but #2 would be attractive to
> me if the internals of couchdb are more geard to large repositories with
> tens of thousands of views as apposed to ten thousand databases with 30 or
> so views each.
>
> thanks
>
> -- troy
>
>
>



-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message