mtools icon indicating copy to clipboard operation
mtools copied to clipboard

Associating getMore commands with the original query

Open csarrazi opened this issue 9 years ago • 0 comments

Currently, when running mloginfo --queries, all getmore commands are grouped by collection, even though they may not be associated to the same query. Finding the query associated with a getmore command can be achieved by comparing the cursor ID. This way, instead of grouping all getmore commands in a single line, they could actually be grouped by query signature. This would very much improve the output of mloginfo --queries, and provide a much better understanding of the reasons why getmore commands can be slow, at times.

It is important to note that there are a few cases where we cannot associate a getmore with a specific query:

  • if the log file was rotated in the middle of a cursor iteration (the query and getmore commands would then be in different log files)
  • if the initial query takes less time than the actual getmore commands (this is possible if there are yields when returning the documents with the getmore command).

csarrazi avatar Jun 23 '16 13:06 csarrazi