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

don't require scan and order when sort spec can have only one value

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None
    • ALL

    Description

      > db.f.drop()
      true
      > db.f.ensureIndex( {a:1,b:1} );
      > db.f.find( {a:[1,2],b:1} ).sort( {b:1} ).explain()
      {
      	"cursor" : "BtreeCursor a_1_b_1 multi",
      	"nscanned" : 0,
      	"nscannedObjects" : 0,
      	"n" : 0,
      	"scanAndOrder" : true,
      	"millis" : 4,
      	"indexBounds" : [
      		[
      			{
      				"a" : 1,
      				"b" : 1
      			},
      			{
      				"a" : 1,
      				"b" : 1
      			}
      		],
      		[
      			{
      				"a" : [
      					1,
      					2
      				],
      				"b" : 1
      			},
      			{
      				"a" : [
      					1,
      					2
      				],
      				"b" : 1
      			}
      		]
      	]
      }
      > 

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: