Re: speeding up hierarchical data fetch

40 views
Skip to first unread message

Jens Alfke

unread,
Feb 14, 2015, 2:56:33 PM2/14/15
to mobile-c...@googlegroups.com

On Feb 9, 2015, at 3:46 PM, Seung Chan Lim <djs...@gmail.com> wrote:

Is there any more efficient way of fetching such hierarchical data?

There are some “fake join” techniques, but they wouldn’t work across two levels of indirection like your example.

In a fake join you create a view that contains rows from both types of documents, and you design the keys so that the rows for a parent and children are adjacent; then you can either query normally and get the parent and children, or you can use grouping to aggregate info about them. I covered this in an “Advanced Couchbase Lite” talk I gave at the Couchbase conference last year; you can find video of it online.

—Jens

Seung Chan Lim

unread,
Feb 19, 2015, 10:33:11 PM2/19/15
to mobile-c...@googlegroups.com
Cool!

Here's the talk if anyone else is interested:

https://www.youtube.com/watch?v=mFQTGiCEHrE


slim
Reply all
Reply to author
Forward
0 new messages