Hi @steevej ,
Thanks for your advice.
I modified the aggregation script:
[
{
$match: {
year: 2024,
month: 8,
day: 1,
"attributes.country": {$ne: null},
}
},
{
$group: {
_id: {
appId: "$appId",
os: "$os",
country: "$attributes.country",
},
value: {
$sum: 1
}
}
}
]
But it still uses fetch.
{
"stage": "FETCH",
"planNodeId": 2,
"nReturned": 180895,
"executionTimeMillisEstimate": 1762,
"opens": 1,
"closes": 1,
"saveState": 696,
"restoreState": 696,
"isEOF": 1,
"numTested": 180895,
"filter": {
"attributes.country": {
"$not": {
"$eq": null
}
}
},
"docsExamined": 180895,
"keysExamined": 0
}
Very strange.