couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Farrell <gsf...@gmail.com>
Subject Server-side union and intersection of views
Date Mon, 21 Feb 2011 17:44:45 GMT
On Sun, Feb 20, 2011 at 8:57 PM, Steve Midgley <science@misuse.org> wrote:
> Hi,
>
> I'm new on this list - hopefully this post is relevant. I'd like to
> ask a bit more about this question of querying multiple views. I come
> from a postgres background, and if I were to solve this problem in
> postgres, I'd just index each of the two fields holding the data and
> let the SQL engine "intersect" the two fields' indices when I select
> against them. Something I'd take for granted on that platform (of
> course the trade-off being lack of flexibility in the indices).
>
> So it seems like it'd be a really handy feature to be able to
> intersect two views together (i.e. take the two view b-trees merge
> them and find all id's that have duplicates). Once you have the
> intersection, you could process this view/b-tree with a list function
> or something?
>
> Is there no way to do this on the server side with couch? Seems like
> arbitrary merge/intersection of views would permit just about anything
> that SQL servers can do with similar performance (and a whole lot more
> flexibility)?

Good question. I imagine that functionality would add complexity to
CouchDB that the devs might not want. I'm sure it's come up before,
though. Maybe someone who's been with the project longer can comment?

Mime
View raw message