Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Compass
Created by Guest
Created on Sep 7, 2022

Explain Plan and query to work on all valid queries -- if an official driver works the Compass should be able to help debugging

Mongo Compass Explain Plan cannot work on queries which are using common Java available syntax. Having no way to use Explain Plan on valid queries, without modifying the query, should be a feature. ``` { "_id" : { "$in": [{ "$binary" : "6Uk1UVZWl+krPObxzA3wtg==", "$type" : "03" },{ "$binary" : "60Xp1sJ9nMiT6cPy3GA1ig==", "$type" : "03" }] } } ``` should be a valid query in Mongo Compass since it is in Java AND the following error which is returned from both query area and Mongo Compass Explain Plan should not occur for such a query: ``` cannot nest $ under $in ``` One should NOT have to change the query from what a client program naturally uses (the dollar signs) to ``` { "_id" : { "$in": [ BinData(3, "6Uk1UVZWl+krPObxzA3wtg=="), BinData(3, "60Xp1sJ9nMiT6cPy3GA1ig==") ] } } ``` I suspect that this change would be to augment the underlying query language, but, the exact implementation to having a tool which can tell me whether the exact query Java is using will be using the index is something which would be up to Mongo Corporation debate.
  • Attach files