Will MongoDB Query planner cache data get replicated to secondary from primary?

23 views
Skip to first unread message

Manoj Vivek

unread,
May 26, 2014, 12:35:06 PM5/26/14
to mongod...@googlegroups.com
Hi All,
I have a strange problem in mongoDb index selection that makes me ask this question, Does Query planner cache data get replicated to secondaries from primary?

I have a mongoDB cluster running version 2.2, with one primary, one secondary and one hidden secondary. The hidden secondary is used for offline analytics.

I have index 'A' in all servers. And index 'B' in hidden secondary alone(not in other servers) covering analytics queries. Here index 'A' and 'B' has overlapping fields. B covers the analytics query fully, But A partially covers the query. The hidden secondary doesn't receive any query that uses index A, only primary and secondary receives query satisfied by index A. 

But when the analytics query is given, the hidden secondary selects index 'A' instead of index 'B', which fully covers the query.

Can anyone face this issue?
Also is there anyway to view query planner cache data in 2.2 ( like in 2.6)?

-Manoj Vivek

Asya Kamsky

unread,
May 28, 2014, 8:22:17 PM5/28/14
to mongodb-user
There is no replication of query plans.

In 2.2 you can't see the cached plan info but you can run query with explain(true) on a typical query and if you post that here maybe we can see why index A is being selected over index B.

Asya



--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CANMwErP2vjskv_frYNCpxbfk9hGtw9%3DqbPeEHkHcLD5uUnLMvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages