Open PrasannaSM opened 2 years ago
Hi @PrasannaSM,
I looked into this previously and unfortunately logged aggregation pipelines didn't seem well suited for a concise summary of query patterns being executed per https://github.com/rueckstiess/mtools/issues/338#issuecomment-568435401. This comment also includes some suggestions on how to investigate slow aggregation queries.
It was intentional to use None
for the aggregation pattern as output becomes extremely difficult to reduce & read with longer aggregations.
Aside from index usage in initial pipeline stages that fetch data, most of the processing time for an aggregation pipeline will typically be spent on data manipulation rather than queries.
Regards, Stennie
Thanks @stennie
I get where you're coming from. In that case, can't we provide arg support to show aggregate pattern
mloginfo mongo.log --queries --show-aggregate-pattern
Only if --show-aggregate-pattern
is provided, we would display pattern. otherwise, it will be morphed as None
(current behavior)
Readability issue can be addressed if user can write it to a file instead of viewing a table
Running mloginfo on a mongo log file with
--queries
option returnsNone
as pattern for aggregate operation. The property definition is as followsThere is no case for handling
aggregate
command in the above snippet. This behavior of mloginfo restricts the context of having a common place where the complete summary (in table form) would be available.Expected behavior
Actual/current behavior