How to view the raw MongoDB query from a question

Is it possible to view the raw MongoDB query being run when asking questions? Each time I update the date range or a filter, it takes well over 1 minute to return results. I am assuming this is because I am missing indexes in MongoDB. What is the best way to determine the indexes that should be created?

Hi @justink101
I don’t use MongoDB, but most databases has an option to turn on query logging.
Otherwise you can use the browser console network-tab to check the request, which usually has the query being executed in the response data. Note it’s not always the exact, when doing advanced stuff like cumulative, Metabase is doing magic in the middle.