How do I do an explain on a mongo query through meteor?


Is there a way to do this? or do I have to translate my query into something I can run in the mongo shell directly and then do the .explain() on that?


Need to do it through the mongo shell, as far as I’m aware.


OK, thanks… considering the syntax is different sometimes, it would be nice to be able to get it inside the meteor framework…


You can do it by:
Collection.find( { $query: {'some': 'query'}, $explain: 1 } ).fetch()

Cheers :slight_smile: