On 12 June 2015 at 14:13, Chetan Mehrotra <[email protected]> wrote:

> On Fri, Jun 12, 2015 at 5:20 PM, Ian Boston <[email protected]> wrote:
> > Are all queries expected to query all keys within a collection as it is
> > now, or is there some logical structure to the querying ?
>
> Not sure if I get your question. The queries are always for immediate
> children. For for 1:/a the query is like
>
> $query: { _id: { $gt: "2:/a/", $lt: "2:/a0" }
>


So, knowing that /a and all its children was in collection nodes_a, you
would only need to query nodes_a ?

But if /a was stored in nodes_root and its children were stored in
nodes_[a-z] (26 collections), then you would need to map reduce over all 26
collections ?

Initially I was thinking about the locking behaviour but I realises 2.6.*
is still locking at a database level, and that only changes to at a
collection level 3.0 with MMAPv1 and row if you switch to WiredTiger [1].

Even so, would increasing the number of collections have an impact on query
costs. ie put /oak:index in its own collection and isolate its indexes ?

Best Regards
Ian


1 http://www.wiredtiger.com/



>
> Chetan Mehrotra
>

Reply via email to