Created
September 22, 2016 23:59
-
-
Save Splat/76ceda72be6c6c8da2466773c6c4433b to your computer and use it in GitHub Desktop.
Working with the mongodb oplog for non indexed queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /var/log/mongodb/ | |
grep '2015-07-10' mongodb.log| grep IXSCAN | sed -e s'/.*planSummary: IXSCAN//' | sed -e 's/ cursorid.*//; s/ keyUpdates.*//; s/ nto.*//; ' | perl -lne 'print join "\n", split /, IXSCAN/;' | perl -pne 's/(^\s+)//' | sort | uniq -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment