> On Aug 10, 2014, at 10:49 AM, qw <[email protected]> wrote:
> 
> Mac OS X. I have about 50k documents and several views each from 10 to 40k 
> docs. I remember reduce function is calculated in runtime at the moment, 
> right?

Yes, because we can't use the CouchDB trick of sticking intermediate reduce 
values into the b-tree nodes. (With ForestDB we might be able to do that, but 
it would depend on the ForestDB implementors adding the functionality to do so.)

> Of course I could save intermediate values somewhere, but I thought CBL might 
> already have this functionality :)

It doesn't currently, although the idea of doing so just came up in the 
discussion of issue #163 
<https://github.com/couchbase/couchbase-lite-ios/issues/163>.

> By the way is it safe to execute raw SQL on underlying database? Or it is not 
> the best idea considering coming of forestdb backend?

It'll work for now but would of course break in the future when we stop using 
SQLite.
A good compromise might be for you to implement the fix of #163, and as part of 
that, expose a native API to get the total row-count of a view.

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/53D30CB6-2976-4467-B4A7-F85A6C59860F%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to