[SERVER-56422] Collect and expose usage statistics for aggregate expressions Created: 28/Apr/21  Updated: 29/Oct/23  Resolved: 18/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Anton Korshunov Assignee: Milena Ivanova
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-59123 Add benchmarks for frequently used ag... Closed
Documented
Duplicate
is duplicated by SERVER-56603 Track usage of aggregation expression... Closed
Problem/Incident
Related
related to SERVER-57020 Extend tests for aggregation expressi... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4, v4.2
Sprint: Query Optimization 2021-05-03, Query Optimization 2021-05-17, Query Optimization 2021-05-31
Participants:
Linked BF Score: 0

 Comments   
Comment by Githook User [ 18/May/21 ]

Author:

{'name': 'Milena Ivanova', 'email': 'milena.ivanova@mongodb.com', 'username': 'mivanova3'}

Message: SERVER-56422 Collect and expose usage statistics for aggregate expressions
Branch: master
https://github.com/mongodb/mongo/commit/593376ad56a8f759faf7f8ad743cbbff5dbf1cf1

Comment by Anton Korshunov [ 04/May/21 ]

We haven't settled on the final name yet, but yes, you can call them aggregation pipeline operators. It would likely to have the same meaning and behaviour as the aggStageCounters.

Comment by Bruce Lucas (Inactive) [ 04/May/21 ]

Also, is this counting the number of queries containing each operator, the total number of such operators contained in executed queries, or the number of times such operators are executed (if that's different from the previous), or something else?

Comment by Bruce Lucas (Inactive) [ 04/May/21 ]

And if so should this be called aggOperatorCounters?

Comment by Bruce Lucas (Inactive) [ 04/May/21 ]

anton.korshunov maybe I'm just confused by the term "expression" in this context - do you mean every operator in the list?

Comment by Anton Korshunov [ 04/May/21 ]

bruce.lucas It's a placeholder for any MQL expression that we support. Every expression in this list will have a corresponding entry under the aggExpressionCounters document.

Comment by Bruce Lucas (Inactive) [ 04/May/21 ]

Copying proposed schema from SERVER-56603 for reference:

"metrics" : {
   "aggExpressionCounters" : {
         "$reduce" : <num>,
         ...
         "<expression>" : <num>
         }
   },
   ...
}

What does "<expression>" mean? Is this a literal string "<expression>" or a placeholder for something open-ended? Just checking to make sure we're not excessively inflating FTDC.

Generated at Thu Feb 08 05:39:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.