Skip to content

Instantly share code, notes, and snippets.

@steveinatorx
Created November 2, 2016 21:37
Show Gist options
  • Save steveinatorx/277ccf7e2b6e016a5471923c24e1e6a8 to your computer and use it in GitHub Desktop.
Save steveinatorx/277ccf7e2b6e016a5471923c24e1e6a8 to your computer and use it in GitHub Desktop.
// find the latest query that matches criteria in mongodb
db.system.profile.find({ "op" : "command", "command.query.Criteria" : {"$exists": true} }, { "command" : 1}).limit(1).sort( { ts : -1 } ).pretty()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment