The "explain" feature doesn't honor hints

In an IntelliShell I do something like:

db.getCollection("...").find({...}).hint("...")

After executing the above, I click the “Explain Query” button on the bottom/results pane. The resulting “Explain” pane shows that the hinted index was not used. If I do the same command as above in a Mongo shell, it does show the hinted index. All I can guess is that the “Explain Query” re-executes the original query (with the addition of the “explain()” function) but doesn’t carry the hint over from the original query.

Is there a way to get the feature to honor the hint?

Hey Nathaniel, I see you also messaged us via our Support team. We created a ticket to investigate this. Thanks for reaching out!

Yvonne

1 Like