Is there a way to run .explain() or equivalent on Linq queries? I would want to know
- The text of the actual JSON query
- The output of
.explain()(indexes used, etc) - It would also be nice to have the execution time of the query
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can get the Json easily enough if you have a query wrapper;
There’s also an Explain() method on MongoCursor, so you could do this;
So if you want the time taken, “millis” is in there;
If you have an
IQueryable, try something like this;