With a 2.7.1 or greater shell
var tests=[]
load ('/home/alvin/mongo-perf-current/util/utils.js')
tests.push( { name: "Queries.FindProjectionDottedField",
pre: function( collection ) {
collection.drop();
for ( var i = 0; i < 1000; i++ ) {
collection.insert( { x : { y: i } } );
}
},
ops: [
{ op: "find",
query: { },
filter: { 'x.y' : 1, _id : 0 } }
] } );
2.5.4 introduced a performance regression for Queries.FindProjectionDottedField over 2.4.10 which still exists in 2.6.4.