You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Devin Guedo <de...@gmail.com> on 2009/10/31 02:45:03 UTC

Query across databases

hi all,

I was wondering what would be the optimal way to query across databases?

Quick example; you have a SAS blog platform. Each blog has its own database,
storing the individual posts and comments as separate documents. You write a
view that counts the comments for individual posts. Essentially a list of
posts, in order, by their comment count. But, now you want a global list, a
top 100 posts based on comment count from across the whole site, spanning
all databases. How would one do that efficiently?

Thanks

Re: Query across databases

Posted by Devin Guedo <de...@gmail.com>.
Thanks Jan,
I didn't know about lounge, this seems very promising.

cheers

On Sat, Oct 31, 2009 at 4:32 AM, Jan Lehnardt <ja...@apache.org> wrote:

>
> On 31 Oct 2009, at 02:45, Devin Guedo wrote:
>
>  hi all,
>>
>> I was wondering what would be the optimal way to query across databases?
>>
>> Quick example; you have a SAS blog platform. Each blog has its own
>> database,
>> storing the individual posts and comments as separate documents. You write
>> a
>> view that counts the comments for individual posts. Essentially a list of
>> posts, in order, by their comment count. But, now you want a global list,
>> a
>> top 100 posts based on comment count from across the whole site, spanning
>> all databases. How would one do that efficiently?
>>
>
> You might be able to bend http://tilgovi.github.com/couchdb-lounge/ in
> that direction.
>
> Cheers
> Jan
> --
>
>

Re: Query across databases

Posted by Jan Lehnardt <ja...@apache.org>.
On 31 Oct 2009, at 02:45, Devin Guedo wrote:

> hi all,
>
> I was wondering what would be the optimal way to query across  
> databases?
>
> Quick example; you have a SAS blog platform. Each blog has its own  
> database,
> storing the individual posts and comments as separate documents. You  
> write a
> view that counts the comments for individual posts. Essentially a  
> list of
> posts, in order, by their comment count. But, now you want a global  
> list, a
> top 100 posts based on comment count from across the whole site,  
> spanning
> all databases. How would one do that efficiently?

You might be able to bend http://tilgovi.github.com/couchdb-lounge/ in  
that direction.

Cheers
Jan
--


Re: Query across databases

Posted by Paul Joseph Davis <pa...@gmail.com>.
Create a background process that writes post/comment pairs to a new db  
and query the derivative data.



On Oct 30, 2009, at 9:45 PM, Devin Guedo <de...@gmail.com> wrote:

> hi all,
>
> I was wondering what would be the optimal way to query across  
> databases?
>
> Quick example; you have a SAS blog platform. Each blog has its own  
> database,
> storing the individual posts and comments as separate documents. You  
> write a
> view that counts the comments for individual posts. Essentially a  
> list of
> posts, in order, by their comment count. But, now you want a global  
> list, a
> top 100 posts based on comment count from across the whole site,  
> spanning
> all databases. How would one do that efficiently?
>
> Thanks