MongoDB 3.0 explains () the result of an undocumented filter field

I run the explanation with the following query:

db.explain().find({ site_id:1, dimensions:[], create_date: { $gte: new Date(1452603948196) } )

The result contains the filter object , what does this mean?

{ "winningPlan" : {
        "stage" : "FETCH",
        "filter" : {
            "dimensions" : {
                "$eq" : [ ]
            }
        },
        "inputStage" : {
            "stage" : "IXSCAN",
            "keyPattern" : {
                "site_id" : 1,
                "dimensions" : 1,
                "create_date" : 1
            }, }

As far as I understand, this means that mongo filters objects after it scans the index and retrieves documents in memory, right?

thanks,

+4
source share
2 answers

Your results will be filtered based on criteria whose size is equal to the values ​​specified in the array.

+1
source

Yes you are right. From the explanation documentation

. ( ) node. . , . node , MongoDB .

explain.queryPlanner.winningPlan.stage , .

, . , IXSCAN , . , .

explain.queryPlanner.winningPlan.inputStage , , . , .

, IXSCAN FETCH ( ), IXSCAN FETCH.

: https://docs.mongodb.com/manual/reference/explain-results/

+1

Source: https://habr.com/ru/post/1624783/


All Articles