Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27521

For covered index queries in agg, don't hydrate field names before converting to Document

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
    • Query Execution

      For covered index queries in agg don't hydrate field names before converting to Document.

      		"$cursor" : {
      			"query" : {
      				"type" : "Music"
      				},
      				"fields" : {
      					"format" : 1,
      					"genre" : 1,
      					"subclass" : 1,
      					"_id" : 0
      				},
      				"queryPlanner" : {
      					"plannerVersion" : 1,
      					"namespace" : "bestbuy.products",
      					"indexFilterSet" : false,
      					"parsedQuery" : {
      						"type" : {
      							"$eq" : "Music"
      						}
      					},
      					"winningPlan" : {
      						"stage" : "PROJECTION",
      						"transformBy" : {
      							"format" : 1,
      							"genre" : 1,
      							"subclass" : 1,
      							"_id" : 0
      						},
      						"inputStage" : {
      							"stage" : "IXSCAN",
      							"keyPattern" : {
      								"type" : 1,
      								"subclass" : 1,
      								"genre" : 1,
      								"format" : 1
      							},
      							"indexName" : "type_1_subclass_1_genre_1_format_1",
      							"isMultiKey" : false,
      							"multiKeyPaths" : {
      								"type" : [ ],
      								"subclass" : [ ],
      								"genre" : [ ],
      								"format" : [ ]
      							},
      							"isUnique" : false,
      							"isSparse" : false,
      							"isPartial" : true,
      							"indexVersion" : 2,
      							"direction" : "forward",
      							"indexBounds" : {
      								"type" : [
      									"[\"Music\", \"Music\"]"
      								],
      								"subclass" : [
      									"[MinKey, MaxKey]"
      								],
      								"genre" : [
      									"[MinKey, MaxKey]"
      								],
      								"format" : [
      									"[MinKey, MaxKey]"
      								]
      							}
      						}
      					},
      					"rejectedPlans" : [ ]
      			}
      		}
      

      Ideally this would eliminate "stage" : "PROJECTION" or replace it with agg specific stage.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: