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 Atlas
Created by Guest
Created on May 20, 2022

Re-run a query from the profiler tab

When using the profiler tab, if there is a $regex expression specified, it comes back in the logs as $regularExpression. Similar issues for ObjectID() vs generated $oid. For some reason, you can’t take the query the profiler outputs and just plug it back in to mongo. You have to manipulate it. Displaying a valid query from the profiler tab in which I could either click “Open query in aggregation viewer” and open the aggregation pane for that collection with this query pre-populated, and/ allow easy copy+pasting of a valid query elsewhere. The first thing I've been doing with query optimization is to start by taking that slow query and plugging it in as-is, then manipulating it and play with indexes. Having the ability to just click the query from the profiler and immediately go to the collection and re-run that same query would speed up that workflow so much.
  • Attach files