Ottimo per prevedere la creazione di eventuali indici senza utilizzare il profile standard.
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
while(1) { | |
var c = db.currentOp(); | |
if(c && c.inprog && c.inprog.length > 0 && c.inprog[0].op == 'query') { | |
var el = c.inprog[0]; | |
if( el.ns == 'admin.$cmd' || el.ns == 'local.$cmd' || el.ns == '') | |
continue; | |
print("on:" + el.ns); | |
if(el.microsecs_running && el.microsecs_running.floatApprox) | |
print("time:" + el.microsecs_running.floatApprox); | |
print("query: " + JSON.stringify(el.query)); | |
print(); | |
}; | |
}; |
on:<dbname>.<collectionname>
time:12968
query: {"_id":{"str":"54b64c9ee4b009e7c6df0f40"}}
on:<dbname>.<collectionname>
time:18489
query: {"_id":{"str":"54b64c9ee4b009e7c6df0f40"}}
on:<dbname>.<collectionname>
time:131
query: {"field1":"515c785c9ccb3d8e563baf32","field2":"AAA","field1":"BBB"}
Nessun commento:
Posta un commento